So, I just downloaded 0.99 rc1 and wanted to play with axesgrid examples and
got the results you reported below in your example. I am in fact naive, and
its not clear to me how to get around this problem of the demo_image module
not being found. What is the solution?
Thanks,
Josh
John Hunter-4 wrote:
>
> In some examples, I have been moving example functions and data into a
> module, so that they can be run from anywhere. Many other examples
> still rely on a relative path in the examples dir. Eg, I go to the
> gallery and download the source for the axes grid toolkit example
> simple_rgb.py, and try to run it from my desktop, I get the error "no
> module names demo_image". While I know how to get the data, a naive
> user will not. So in some examples I have been adopting the approach,
> eg in examples/pylab_examples/scatter_demo2.py
>
> import matplotlib
> datafile = matplotlib.get_example_data('goog.npy')
>
> These examples will run anywhere mpl is installed. Another approach
> would to write a version of get_example_data that checks locally for a
> datafile, and if it is not where you expect to be, attempt a
> urlretrieve as a temp file.
>
> The gallery is becoming the goto place for most users of the website,
> and I would like as many examples as possible to run after a simple
> download to the desktop . I am sensitive to packagers who may not
> want to ship large amounts of data w/ the main library, so we may want
> to minimize the amount we ship in mpl-data which
> matplotlib.get_example_data uses, but it may be a good idea to setup a
> new svn directory at the top level (mpl_data) and write a urllib
> enabled matplotlib.get_example_data that fetches it from the repo if
> it can't find it locally.
>
> JDH
>
-----
Josh Hemann
Statistical Advisor
http://www.vni.com/ Visual Numerics
[email protected] | P 720.407.4214 | F 720.407.4199
--
View this message in context:
http://www.nabble.com/example-data-in-example-code-tp24760754p24811726.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel