-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Doc]: Commented Out Code in Downloadable Examples for Toolkits Tutorials #25582
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
Comments
Hey @Higgs32584, I want to work on this issue. I had one doubt. Do I just uncomment the code in the files, or can I change the comments to make the code more understandable? A lot of it referencing images which is good for website but might be confusing in the actual python file. |
Yeah, so I am still trying to get my first GitHub commit as well, so I do not know the codebase too well. Right now, it looks like you have to uncomment the code on both sides, cause it is intersped with regular comments as well. Also, it looks like a lot of the example code won't run without it's proper imports, and some initial data objects are missing, so you will have to add those as well. Finally, you'll have to load the documentation in sphinx to make sure it is framed correctly. I tried doing this today, and it looks like loading the documentation can take a bit of time. If you are confused, you can look at another downloadable example. It looks like someone forgot to finish writing it out. I would also wait until we get an admin to comment on this before you begin working on it. |
This Issue will be a bit confusing given the links above. Those three files were moved, and are now served at https://matplotlib.org/devdocs/users/explain/toolkits/index.html This code is somewhat confusing because it is not really written as a sphinx-gallery py file, but rather look to have been translated from bare rst and reformatted as python comments to be able to be run through sphinx gallery. Note that none of the code is executed in either sphinx-gallery nor using the plot directive, and that the figures are all made in the examples gallery, eg, https://matplotlib.org/stable/gallery/axes_grid1/demo_axes_rgb.html, and simply linked here. My suggestion would be that these get re-written as *.rst files, which will get rid of the download links. If people want the code downloads, they can click through to the individual gallery examples. If we do this, then the index.rst will need to be made by hand. |
Did you build the gallery? If not, then the figure directives will yield broken links ... As for the index.rst it isn't great currently - I'd just add a toctree command to it (look for :toctree: in the rest of the codebase to see how to do this). |
No, I have not built another index. and I would create the index.rst here, correct? C:\Users\mjhig.vscode\bob\matplotlib\galleries\users_explain\toolkits |
You would rename the readme there and replace it with an index.rst with the appropriate introductory sentences, and a "toctree" directive listing the three subfiles... |
Hi @jklymak I am attaching my resume as well as the link to my github which contains all my projects. Thank you for your time and consideration. I hope to hear from you soon. |
@Pritishchugh22 please see out contributors’ guide here: |
Uh oh!
There was an error while loading. Please reload this page.
Documentation Link
https://matplotlib.org/stable/tutorials/toolkits/index.html
Problem
All the code is commented out in all three downloadable python examples from toolkits. When you download the files, either the .py or the .ipynb, built from each separate .py file(i.e. axes_grid.py and axes_grid.ipynb are built from the same code), all the code is commented out in each example.
Suggested improvement
It is suggested that the files referenced be rewritten as *.rst files. This would eliminate the need for download links and instead direct users to the individual gallery examples if they wish to download the code. It should be noted that the code in the files is not written in the format of a sphinx-gallery py file, but rather as python comments translated from bare rst. Therefore, none of the code is executed in sphinx-gallery or using the plot directive, and the figures are made in the examples gallery and simply linked to from the documentation. Additionally, it will be necessary to manually create the index.rst file if this solution is implemented.
The text was updated successfully, but these errors were encountered: