Skip to content

Commit

Permalink
Exclude figure captions from image comparison tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthomas23 committed Jan 26, 2024
1 parent 7f1686a commit fadf80f
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 38 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 5 additions & 24 deletions ui-tests/tests/notebooks/ipympl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"fig = plt.figure()\n",
"plt.plot(np.sin(np.linspace(0, 20, 100)))\n",
"fig, ax = plt.subplots()\n",
"\n",
"# Remove text to avoid tiny differences in rendered output.\n",
"from matplotlib.testing.decorators import remove_ticks_and_titles\n",
"remove_ticks_and_titles(fig)"
"remove_ticks_and_titles(fig)\n",
"fig.canvas.header_visible = False\n",
"\n",
"ax.plot(np.sin(np.linspace(0, 20, 100)));"
]
},
{
Expand All @@ -29,27 +31,6 @@
"source": [
"fig.canvas"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9018cb24",
"metadata": {},
"outputs": [],
"source": [
"fig.canvas.toolbar_visible = False\n",
"fig.canvas"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "46af41c8",
"metadata": {},
"outputs": [],
"source": [
"display(fig)"
]
}
],
"metadata": {
Expand Down
20 changes: 6 additions & 14 deletions ui-tests/tests/notebooks/ipympl_update.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"fig = plt.figure()\n",
"plt.plot(np.sin(np.linspace(0, 20, 100)))\n",
"fig, ax = plt.subplots()\n",
"\n",
"# Remove text to avoid tiny differences in rendered output.\n",
"from matplotlib.testing.decorators import remove_ticks_and_titles\n",
"remove_ticks_and_titles(fig)"
"remove_ticks_and_titles(fig)\n",
"fig.canvas.header_visible = False\n",
"\n",
"ax.plot(np.sin(np.linspace(0, 20, 100)));"
]
},
{
Expand All @@ -27,7 +29,7 @@
"metadata": {},
"outputs": [],
"source": [
"plt.plot(np.cos(np.linspace(0, 20, 100)));"
"ax.plot(np.cos(np.linspace(0, 20, 100)));"
]
},
{
Expand Down Expand Up @@ -130,16 +132,6 @@
"fig.canvas.toolbar.button_style = ''"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0d86fce3",
"metadata": {},
"outputs": [],
"source": [
"fig.canvas.header_visible = False"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit fadf80f

Please sign in to comment.