0

Where is the documentation kept for spyder (python IDE) to access?

As I am typing plot.savefig( in the spyder console, I get a pop up for the documentation for savefig(). It's a pretty nice feature, but it disappears as soon as I move the mouse. Where is it pulling this documentation from? I have searched the /doc folder and can't find anything related to matplotlib. I would like to open it in a PDF viewer on another monitor.

import matplotlib.pyplot as plt
plt.savefig()

Here is an image of the documentation for clarification:

Image of savefig doc

1
  • Are you looking for this documentation, or for some other documentation? pythonhosted.org/spyder Commented May 26, 2014 at 21:21

3 Answers 3

5

The documentation that you're seeing comes from the docstrings of the function you typed in. You can get the raw text with plt.savefig.__doc__, or get it with a bit of formatting by using the builtin help command from an interactive interpreter: help(plt.savefig). Spyder applies some additional fancy formatting to the contents of its documentation window.

How detailed the documentation is will vary quite a bit from module to module. In the case of matplotlib, it's quite detailed, probably because the maintainers have put the effort in to make it easy to use that package without a lot of programming experience.

As for your question about how you can view those docs outside of Spyder, I'd suggest looking online. I see on the matplotlib homepage they have extensive documentation, including web pages with the same contents as the docs you were seeing (presumably generated from the same docstrings).

Sign up to request clarification or add additional context in comments.

1 Comment

Ah thanks for the background information on the doc function. Ah the website is great. This isn't wasn't what I had in mind for the answer, but this is the answer. Thanks
1

(Spyder dev here) The documentation you mean is the little yellow box next to plt.savefig(, right? These are called calltips and I fixed them in our next version (2.3, in release candidate now) so that they are maintained on screen if you put the mouse over them and hidden if you click on them or automatically after a certain time.

Notes:

  1. This doesn't work in Spyder 2.2.5 or before.

About the documentation: We are planning to add tabs the Object Inspector so you can view several documentation pages at the same time.

Comments

0

This may be not relevant to you now but now you can use ?plt.savefig. This will come handy for R users who are migrating to python on spyder because both follow same way to display documentation.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.