Hi guys,

> You can now do:
>
> .. plot::
>
>     from matplotlib.pyplot import *
>     plot([1,2,3])

This is very nice - thank you for doing that.

But, thinking about the online tutorials, you often want to do
something as you can do with the sourcecode directive, as in:

.. testcode::

   import numpy as np
   print np.inf

Some text then

.. testoutput::

   inf

More text

.. testcode::

   # I still have the context from the blocks above
   print np.nan

More text

.. testoutput::

   nan


In that way, I can build up a tutorial, setting and calculating
variables, doing plots as I go, without having to recreate the
calculations at each step.

Is it possible to make the ..plot directive pick up the context in the same way?

Thanks a lot,

Matthew

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to