[yt-users] Updated yt dev and now have strange plotting error

Nathan Goldbaum nathan12343 at gmail.com
Fri Jun 24 12:56:41 PDT 2016


Hi Stephanie,

The quick fix is to update your matplotlib installation:

$ pip install -U matplotlib

There's an open pull request that fixes your issue, it should be merged
soon:

https://bitbucket.org/yt_analysis/yt/pull-requests/2234/fix-compatibility-with-matplotlib-143-and/diff

-Nathan

On Fri, Jun 24, 2016 at 2:39 PM, Stephanie Tonnesen <stonnes at gmail.com>
wrote:

> Hi yt-users,
>
> I just updated my yt dev and suddenly my plotting scripts don't work.
> When I actually try and save my plot, I am told that I don't have "classic"
> style available.  I am not sure where this problem is coming from, does
> anyone have some advice for me?
>
> The code commands:
>
> ds =
> yt.load("/data001/stonnes/MWtype_BPtest/DD"+loop[i]+"/DDMWtestf"+loop[i])
> ds.add_field(('gas','tracer'),function=tfrac)
> logs = {('index','cylindrical_r'):False}
> logs = {('gas','velocity_z'):False}
> logs = {('gas','velocity_x'):False}
> logs = {('gas','velocity_y'):False}
> logs = {('gas','tracer'):False}
>
> ds.index
> ds.field_info['gas','velocity_z'].take_log = False
> ds.field_info['gas','velocity_x'].take_log = False
>
> plot6p = yt.ProjectionPlot(ds,"z","density")
> plot6p.save()
>
> The error message:
>
> yt : [INFO     ] 2016-06-24 12:25:04,736 Parameters:
> current_time              = 0
> yt : [INFO     ] 2016-06-24 12:25:04,736 Parameters:
> domain_dimensions         = [256 256 256]
> yt : [INFO     ] 2016-06-24 12:25:04,736 Parameters:
> domain_left_edge          = [ 0.  0.  0.]
> yt : [INFO     ] 2016-06-24 12:25:04,737 Parameters:
> domain_right_edge         = [ 1.  1.  1.]
> yt : [INFO     ] 2016-06-24 12:25:04,737 Parameters:
> cosmological_simulation   = 0.0
>
> Parsing Hierarchy :   0%|          | 0/2503 [00:00<?, ?it/s]
> Parsing Hierarchy : 100%|##########| 2503/2503 [00:00<00:00, 33786.39it/s]
> yt : [INFO     ] 2016-06-24 12:25:04,952 Gathering a field list (this may
> take a moment.)
> yt : [INFO     ] 2016-06-24 12:25:50,114 Projection completed
> yt : [INFO     ] 2016-06-24 12:25:50,328 xlim = 0.000000 1.000000
> yt : [INFO     ] 2016-06-24 12:25:50,328 ylim = 0.000000 1.000000
> yt : [INFO     ] 2016-06-24 12:25:50,329 xlim = 0.000000 1.000000
> yt : [INFO     ] 2016-06-24 12:25:50,329 ylim = 0.000000 1.000000
> yt : [INFO     ] 2016-06-24 12:25:50,336 Making a fixed resolution buffer
> of (('gas', 'density')) 800 by 800
> yt : [INFO     ] 2016-06-24 12:25:51,408 Saving plot
> DDMWtestf0000_Projection_z_density.png
> Traceback (most recent call last):
>   File "yt_slicesonly_allouts.py", line 29, in <module>
>     plot6p.save()
>   File
> "/home/stonnes/yt-x86_64/src/yt-hg/yt/visualization/plot_container.py",
> line 79, in newfunc
>     rv = f(*args, **kwargs)
>   File
> "/home/stonnes/yt-x86_64/src/yt-hg/yt/visualization/plot_container.py",
> line 575, in save
>     names.append(v.save(n, mpl_kwargs))
>   File
> "/home/stonnes/yt-x86_64/src/yt-hg/yt/visualization/base_plot_types.py",
> line 104, in save
>     with matplotlib_style_context():
>   File "/home/stonnes/yt-x86_64/lib/python2.7/contextlib.py", line 17, in
> __enter__
>     return self.gen.next()
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/style/core.py",
> line 86, in context
>     use(name)
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/style/core.py",
> line 66, in use
>     raise ValueError(msg % style)
> ValueError: 'classic' not found in the style library and input is not a
> valid URL or path. See `style.available` for list of available styles.
>
> Thanks!
> Stephanie
> --
> Dr. Stephanie Tonnesen
> Alvin E. Nashman Postdoctoral Fellow
> Carnegie Observatories, Pasadena, CA
> stonnes at gmail.com
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160624/a92f896d/attachment.html>


More information about the yt-users mailing list