![](https://secure.gravatar.com/avatar/3d3176cf99cae23d0ac119d1ea6c4d11.jpg?s=120&d=mm&r=g)
Hi all, Is anyone already working on getting plots in the docs? If not, I will play with that. Two other things I noticed in the docs: - missing inheritance diagrams. this works for me when building the docs, just needs graphviz installed - the link in the top corner. there is no way right now to go back to the main page (http://stefanv.github.com/scikits.image/) from the API docs. One question for working with the docs, how should I set up my git branch? I got it down for the master branch now, but got lost in the git docs about tracking other remote branches. "git fetch" doesn't grab them it seems. Cheers, Ralf
![](https://secure.gravatar.com/avatar/af6c39d6943bd4b0e1fde23161e7bb8c.jpg?s=120&d=mm&r=g)
2009/10/13 Ralf Gommers <ralf.gommers@googlemail.com>:
One question for working with the docs, how should I set up my git branch? I got it down for the master branch now, but got lost in the git docs about tracking other remote branches. "git fetch" doesn't grab them it seems.
Thanks for working on the docs! You can simply create a new docs branch, e.g. if you already have a clone of my master do: git checkout -b docs Then fix the docs up there and push back to github (git push origin docs), from where I'll grab your changes. Don't worry about the gh-pages branch, that's just what github uses to host the pages. Cheers Stéfan
![](https://secure.gravatar.com/avatar/3d3176cf99cae23d0ac119d1ea6c4d11.jpg?s=120&d=mm&r=g)
2009/10/13 Stéfan van der Walt <stefan@sun.ac.za>
You can simply create a new docs branch, e.g. if you already have a clone of my master do:
git checkout -b docs
Then fix the docs up there and push back to github (git push origin docs), from where I'll grab your changes.
I just pushed my docs branch. It adds support for the .. plot:: directive,
fixes the links on top of all pages, and some minor issues. Both inline plots and plots from script files work. For an example of the latter see the MultiImage docstring. Below I copy-pasted from the commit message, a few things to keep in mind: - for including scripts from docstrings, use prefix "../plots/", for including scripts in a rst file, use "plots/". This is due to the docs being generated from the source/api folder. - inline plots are not (yet) aware of variables being defined earlier in the Examples section. - we now use the numpydoc sphinx extensions, the original MPL ones can not be used because they have no support for the make file and conf.py not being in the same folder. There is one minor thing that does not work yet. The source code link for plots does not work because for some reason the script files are not copied to the build dir. I'll try to fix this tomorrow, and will then also add a more thorough description of how to use the plot directive to the docs. Cheers, Ralf
![](https://secure.gravatar.com/avatar/af6c39d6943bd4b0e1fde23161e7bb8c.jpg?s=120&d=mm&r=g)
Hi Ralf 2009/10/14 Ralf Gommers <ralf.gommers@googlemail.com>:
I just pushed my docs branch. It adds support for the .. plot:: directive, fixes the links on top of all pages, and some minor issues. Both inline plots and plots from script files work. For an example of the latter see the MultiImage docstring.
Good stuff -- thanks!
- for including scripts from docstrings, use prefix "../plots/", for including scripts in a rst file, use "plots/".
Fixed: you can now just specify the .py filename
There is one minor thing that does not work yet. The source code link for plots does not work because for some reason the script files are not copied to the build dir.
Fixed. Cheers Stéfan
![](https://secure.gravatar.com/avatar/3d3176cf99cae23d0ac119d1ea6c4d11.jpg?s=120&d=mm&r=g)
2009/10/14 Stéfan van der Walt <stefan@sun.ac.za>
Hi Ralf
I just pushed my docs branch. It adds support for the .. plot::
fixes the links on top of all pages, and some minor issues. Both inline plots and plots from script files work. For an example of the latter see
2009/10/14 Ralf Gommers <ralf.gommers@googlemail.com>: directive, the
MultiImage docstring.
Good stuff -- thanks!
- for including scripts from docstrings, use prefix "../plots/", for including scripts in a rst file, use "plots/".
Fixed: you can now just specify the .py filename
There is one minor thing that does not work yet. The source code link for plots does not work because for some reason the script files are not copied to the build dir.
Fixed.
Thanks for fixing the rest Stefan! I was fighting with the MPL plot_directive for a while, then with the numpydoc version, because I did not want to copy the whole extension into the source tree. But now I see your changes that does seem like the best way to go after all. Cheers, Ralf
Cheers Stéfan
![](https://secure.gravatar.com/avatar/af6c39d6943bd4b0e1fde23161e7bb8c.jpg?s=120&d=mm&r=g)
2009/10/14 Ralf Gommers <ralf.gommers@googlemail.com>:
I was fighting with the MPL plot_directive for a while, then with the numpydoc version, because I did not want to copy the whole extension into the source tree. But now I see your changes that does seem like the best way to go after all.
I tried the matplotlib version this morning, and when it didn't work out of the box tried to hack it into a better shape. I was very surprised to see that the quality of code in that extension deteriorated since we grabbed it for numpy! It's almost like the numpy one was written by an entirely different person (I wonder how much Pauli modded it). Either way, I think it's good to have a snapshot for our own purposed that does what we require (e.g., the extra file copy). Sometime in the future we'll look at matplotlib's extension again. Cheers Stéfan
![](https://secure.gravatar.com/avatar/3d3176cf99cae23d0ac119d1ea6c4d11.jpg?s=120&d=mm&r=g)
2009/10/14 Stéfan van der Walt <stefan@sun.ac.za>
2009/10/14 Ralf Gommers <ralf.gommers@googlemail.com>:
I was fighting with the MPL plot_directive for a while, then with the numpydoc version, because I did not want to copy the whole extension into the source tree. But now I see your changes that does seem like the best way to go after all.
I tried the matplotlib version this morning, and when it didn't work out of the box tried to hack it into a better shape. I was very surprised to see that the quality of code in that extension deteriorated since we grabbed it for numpy! It's almost like the numpy one was written by an entirely different person (I wonder how much Pauli modded it). Either way, I think it's good to have a snapshot for our own purposed that does what we require (e.g., the extra file copy). Sometime in the future we'll look at matplotlib's extension again.
Sorry I should have mentioned that more clearly. I think Pauli did a lot of work on it. He also packaged it separately, so you can do: easy_install numpydoc which is how I got it to work. But you're right, having a snapshot is easier still. Cheers, Ralf
Cheers Stéfan
participants (2)
-
Ralf Gommers
-
Stéfan van der Walt