On Friday 13 June 2008 01:22:24 pm John Hunter wrote:
> On Fri, Jun 13, 2008 at 9:40 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote:
> > This task took a lot longer than I expected, so I'm going to have to
> > pause for a while.  But here's a couple of notes for improvement if
> > anyone wants to take it on:
> >
> > 1) Clicking on the image in HTML currently goes to a high-res PNG.  It
> > could instead go to a PDF, which personally I think is preferable, but I
> > know some people are adamantly opposed to installing a PDF plugin in
> > their browser.

Its too bad internet explorer requires a plugin to handle SVG, we could do svg 
for html and pdf for latex. Now that I think of it, maybe we should be 
generating svg files, they can be an additional link, but the pngs are the 
ones that get rendered on the main page. It will help advertise our diverse 
output formats, and many users get a scalable format without having to load 
up Adobe.

> > 2) This only works if the .py files live in users/figures.  A more
> > general solution might be to move the actual rendering of .png and .pdf
> > plots (which currently occurs in users/figures/make.py) to the plot
> > directive itself, and have them rendered even more on-the-fly than they
> > are already.  Then it could pull .py's from anywhere (such as
> > mpl-examples) and put the resulting images in the correct place for
> > sphinx to find them and add them to the build.
> >
> > 3) The CSS could be tweaked so the images don't get a thick border in
> > HTML.  Putting a magnifying glass in the corner would be cool if there's
> > any CSS wizards out there.  But that's an aesthetic consideration.
> > People may like the border.
>
> I've committed some changes that should address all three of these
> issues.  The plot_directive now assumes you are giving it a pyplot
> python file (stored in doc/pyplots) and will generate the savefigs at
> doc build time.  The paths are a bit hairy in these rest directives so
> I decided it was easiest to force all the python files to live in this
> dir, and we can revisit this later.  I am not convinced it is a good
> idea to point to external files anyway for the image generation (like
> examples/something.py) since someone may unwittingly change this w/o
> begin aware the docs are relying on it.  I addressed 1 and 3 by not
> making the image clickable, but rather putting links to the high res
> png and pdf below it, and along with the src there too.  For now I am
> including a link to the src even if the src is not included, but if
> there is a reason not to we can easily remove this.

I just deleted the static_figs directory from svn, and moved the contents into 
pyplots. The generated figures were committed to svn as well, so they should 
not be auto-generated. This way we can consistently use the nice plot 
directive to include all of our figures. I think there should be no problems 
with this transition, but if you see one, please let me know.

I updated the documentation guide to reflect the change.

Darren

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to