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

Matthew Turk matthewturk at gmail.com
Sat Apr 28 21:01:55 PDT 2012


Hi Chris,

One quick note to add to what Nathan wrote is that we are pretty
careful to use the MathText rendering, which is pseudo-LaTeX.  For
instance, you can set labels with:

ax.set_xlabel(r"$\mathrm{Something}\/\mathrm{Interesting}\/[\mathrm{x}^3]$")

Also, I fully support using the FRB's for publication quality plots,
instead of plot collections.

-Matt

On Sat, Apr 28, 2012 at 10:22 PM, Nathan Goldbaum <goldbaum at ucolick.org> wrote:
> 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!
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list