[yt-users] Making custom plots consistent with yt's styles

Nathan Goldbaum goldbaum at ucolick.org
Sat Apr 28 19:22:56 PDT 2012


Hi Chris,

Someone else that knows better than me can correct me, but it looks like all of the matplotlib imports happen in yt/visualization/_mpl_imports.py.

The only configuration is this line: matplotlib.rc('contour', negative_linestyle='solid') which changes the default linestyle for contour plots.  

Other than that, if you use the Agg backend, you should be able to produce plots that look like yt plots.  I believe yt uses the default fonts and matplotlib colortables (except for the ones in yt/visualization/_colormap_data.py.  If you're trying to make publication quality plots, you may want to take a look at the EPS writer that John Wise wrote (yt/visualization/eps_writer.py) which leverages pyx to make really nice native postscript plots, or look at the various plot types (e.g. the RavenPlot in yt/visualization/plot_types.py).

Personally, if I have to make consistent looking plots, I'd like to be in complete control so I use FixedResolutionBuffers and custom matplotlib scripts.

Hope that helps!

-Nathan

On Apr 28, 2012, at 6:59 PM, Christopher Moody wrote:

> Hi all,
> Aesthetically, it'd be nice to make matplotlib plots with a consistent
> style as yt-made plots so that fonts, sizes, color palettes and so on
> agree. I imagine that this means I have to find yt's default
> matplotlib rc, or something analogous, somewhere.
> 
> Many thanks for the help!
> chris
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> 
> !DSPAM:10175,4f9ca0a363302512813236!
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20120428/5ceb957b/attachment.htm>


More information about the yt-users mailing list