-
Notifications
You must be signed in to change notification settings - Fork 3
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
Figure caption for python figures #5
Comments
We are using already numfig. .. _fig-some-figure:
.. plot::
# some code here that produces a figure
Caption of the figure. This will return a That is the reason why I added an additional So, the problem is not, that it is not working altogether, but that it should work in a better way ;) |
This might be interesting: jupyter/notebook#811 |
These might be interesting: sphinx-doc/sphinx#1858 and sphinx-doc/sphinx#2317. |
OK, so hopefully it will work with sphinx 1.4 |
The proposed changes to sphinx are included now, but the problem is that also Considering also sphinx-doc/sphinx#4080, there seems to be a general problem or maybe a not so elegant implementation of references in sphinx. |
This is currently solved by the following workaround implemented by ef70c7b .. plot::
:nofigs:
# some code here that produces a figure
.. plot::
:context:
:include-source: false
:nofigs:
save_fig('some-figure')
.. _fig-some-figure:
.. figure:: some-figure.*
:align: center
Caption of the figure. Whereas |
For the figures created with
.. plot::
, there is in theory the possibility to gave them a caption, but this seems to work only for code included from files.At the moment I solved the problem, by adding another figure:
The
placeholder.png
file is a 1px large file as we have to include something.Another disadvantage is that the provided permalink will only point to this small image (so, only to the caption) and the actual figure will be hidden and you have to scroll up.
The text was updated successfully, but these errors were encountered: