-
-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing SDEC docs page #1817
Fixing SDEC docs page #1817
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Before a pull request is accepted, it must meet the following criteria:
|
1 similar comment
Before a pull request is accepted, it must meet the following criteria:
|
Codecov Report
@@ Coverage Diff @@
## master #1817 +/- ##
==========================================
- Coverage 58.25% 58.22% -0.03%
==========================================
Files 66 66
Lines 6721 6722 +1
==========================================
- Hits 3915 3914 -1
- Misses 2806 2808 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this!
Everything looks great to me, I just had a few small questions though: Is the InlineBackend.figure_format
statement deprecated? It says here in this old version of docs that we must be using InlineBackend.figure_formats
instead. However, in the newer docs even that is deprecated, and it says that we should use matplotlib_inline.backend_inline.set_matplotlib_formats()
.
Maybe you might want to check out this too.
Also, we do not have an option of png2x
there. Is that also deprecated, or is it the same as the retina
option?
Please look into Atharva's comments |
Indeed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I wondered if %config InlineBackend.figure_formats
is deprecated, but it is not mentioned anywhere in the documentation that it is, just the function(IPython.display.set_matplotlib_formats
) is deprecated.
Also, both the png2x
and the retina
options are the same, so I am happy with the changes.
Description
This provides a permanent fix to the issue in #1811. The problem was that the SVG file format which the SDEC plots were saved as are too large (6+ MB per plot). This PR makes it so the plots on this page (not any other page) are exported as high-resolution PNG (png2x) files -- this is not as nice as SVG, but it will do for that page. The file size is much more manageable. I have also included a description of this problem and its solution in the documentation.
Examples
The two pages involved:
https://smithis7.github.io/tardis/branch/sdec_fix_doc/io/visualization/sdec_plot.html
https://smithis7.github.io/tardis/branch/sdec_fix_doc/development/documentation_guidelines.html (see note at the bottom of the page)
Type of change
Checklist