Skip to content

Commit

Permalink
Change pdf preview to png for chrome compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kburns committed Feb 15, 2022
1 parent 42e8e36 commit d920209
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Our numerical algorithms produce sparse and spectrally accurate discretizations
<th width="25%">
<a href="https://dedalus-project.readthedocs.io/en/latest/pages/examples/ivp_1d_kdv_burgers.html">
<figure>
<img src="docs/pages/examples/images/kdv_burgers_preview.png">
<img src="docs/pages/examples/images/kdv_burgers.png">
<figcaption>KdV-Burgers equation (1D IVP)</figcaption>
</figure>
</a>
Expand All @@ -63,7 +63,7 @@ Our numerical algorithms produce sparse and spectrally accurate discretizations
<th width="25%">
<a href="https://dedalus-project.readthedocs.io/en/latest/pages/examples/lbvp_2d_poisson.html">
<figure>
<img src="docs/pages/examples/images/poisson_preview.png">
<img src="docs/pages/examples/images/poisson.png">
<figcaption>Poisson equation (2D LBVP)</figcaption>
</figure>
</a>
Expand Down
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@
# -- Options for nbsphinx galleries
# Using _images/ is a hack to get relocated images which have been included in the pages
nbsphinx_thumbnails = {
'pages/examples/evp_1d_waves_on_a_string': '_images/waves_on_a_string.pdf',
'pages/examples/ivp_1d_kdv_burgers': '_images/kdv_burgers.pdf',
'pages/examples/evp_1d_waves_on_a_string': '_images/waves_on_a_string.png',
'pages/examples/ivp_1d_kdv_burgers': '_images/kdv_burgers.png',
'pages/examples/ivp_2d_rayleigh_benard': '_images/rayleigh_benard.png',
'pages/examples/ivp_2d_shear_flow': '_images/shear_flow.png',
'pages/examples/ivp_ball_internally_heated_convection': '_images/internally_heated_convection.png',
'pages/examples/ivp_disk_libration': '_images/libration.png',
'pages/examples/ivp_shell_convection': '_images/shell_convection.png',
'pages/examples/ivp_sphere_shallow_water': '_images/shallow_water.png',
'pages/examples/lbvp_2d_poisson': '_images/poisson.pdf',
'pages/examples/nlbvp_ball_lane_emden': '_images/lane_emden.pdf',
'pages/examples/lbvp_2d_poisson': '_images/poisson.png',
'pages/examples/nlbvp_ball_lane_emden': '_images/lane_emden.png',
}

2 changes: 1 addition & 1 deletion docs/pages/examples/evp_1d_waves_on_a_string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Script
Output
------

.. image:: images/waves_on_a_string.pdf
.. image:: images/waves_on_a_string.png
:width: 100 %
:align: center
Binary file added docs/pages/examples/images/kdv_burgers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/examples/images/lane_emden.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/examples/images/poisson.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/examples/images/waves_on_a_string.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/pages/examples/ivp_1d_kdv_burgers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Script
Output
------

.. image:: images/kdv_burgers.pdf
.. image:: images/kdv_burgers.png
:width: 100 %
:align: center
2 changes: 1 addition & 1 deletion docs/pages/examples/lbvp_2d_poisson.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Script
Output
------

.. image:: images/poisson.pdf
.. image:: images/poisson.png
:width: 100 %
:align: center
2 changes: 1 addition & 1 deletion docs/pages/examples/nlbvp_ball_lane_emden.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Lane-Emden equation (ball NLBVP)

Resulting image:

.. image:: images/lane_emden.pdf
.. image:: images/lane_emden.png
:width: 100 %
:align: center

4 changes: 3 additions & 1 deletion examples/evp_1d_waves_on_a_string/waves_on_a_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
plt.xlabel("eigenvalue number")
plt.ylabel("relative eigenvalue error")
plt.tight_layout()
plt.savefig('eigenvalue_error.pdf')
plt.savefig("eigenvalue_error.pdf")
plt.savefig("eigenvalue_error.png", dpi=200)

plt.figure(figsize=(6, 4))
x = dist.local_grid(xbasis)
Expand All @@ -78,3 +79,4 @@
plt.xlabel(r"x")
plt.tight_layout()
plt.savefig("eigenvectors.pdf")
plt.savefig("eigenvectors.png", dpi=200)
1 change: 1 addition & 0 deletions examples/ivp_1d_kdv_burgers/kdv_burgers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@
plt.title(f'KdV-Burgers, (a,b)=({a},{b})')
plt.tight_layout()
plt.savefig('kdv_burgers.pdf')
plt.savefig('kdv_burgers.png', dpi=200)

4 changes: 2 additions & 2 deletions examples/ivp_ball_internally_heated_convection/plot_ball.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Plot spherical snapshots.
Plot cutaway ball outputs.
Usage:
plot_sphere.py <files>... [--output=<dir>]
plot_ball.py <files>... [--output=<dir>]
Options:
--output=<dir> Output directory [default: ./frames]
Expand Down
4 changes: 2 additions & 2 deletions examples/ivp_disk_libration/plot_disk.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Plot velocity from joint analysis files.
Plot disk outputs.
Usage:
plot_velocities.py <files>... [--output=<dir>]
plot_disk.py <files>... [--output=<dir>]
Options:
--output=<dir> Output directory [default: ./frames]
Expand Down
4 changes: 2 additions & 2 deletions examples/ivp_sphere_shallow_water/plot_sphere.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Plot cutaway ball outputs.
Plot sphere outputs.
Usage:
plot_ball.py <files>... [--output=<dir>]
plot_sphere.py <files>... [--output=<dir>]
Options:
--output=<dir> Output directory [default: ./frames]
Expand Down
1 change: 1 addition & 0 deletions examples/lbvp_2d_poisson/poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@
plt.title("Randomly forced Poisson equation")
plt.tight_layout()
plt.savefig('poisson.pdf')
plt.savefig('poisson.png', dpi=200)

1 change: 1 addition & 0 deletions examples/nlbvp_ball_lane_emden/lane_emden.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,4 @@
plt.title(f"Lane-Emden, n={n}")
plt.tight_layout()
plt.savefig('lane_emden.pdf')
plt.savefig('lane_emden.png', dpi=200)

0 comments on commit d920209

Please sign in to comment.