yt.extensions.eps_writer.DualEPS.colorbar

DualEPS.colorbar(name, zrange=(0, 1), label='', log=False, tickcolor=None, orientation='right', pos=[, 0, 0], shrink=1.0)

Places a colorbar adjacent to the current figure.

Parameters :

name : string

name of the (matplotlib) colormap to use

zrange : tuple of floats

min and max of the colorbar’s range

label : string

colorbar label

log : boolean

Flag to use a logarithmic scale

tickcolor : pyx.color.*.*

Color for the tickmarks. Example: pyx.color.cmyk.black

orientation : string

Placement of the colorbar. Can be “left”, “right”, “top”, or “bottom”.

pos : list of floats

(x,y) position of the origin of the colorbar in centimeters.

shrink : float

Factor to shrink the colorbar’s size. A value of 1 means the colorbar will have a height / width of the figure.

Examples

>>> d = DualEPS()
>>> d.axis_box(xrange=(0,100), yrange=(1e-3,1), ylog=True)
>>> d.insert_image("image.jpg")
>>> d.colorbar("hot", xrange=(1e-2, 1e-4), log=True,
               label="Density [cm$^{-3}$]")
>>> d.save_fig()

Previous topic

yt.extensions.eps_writer.DualEPS.circle

Next topic

yt.extensions.eps_writer.DualEPS.colorbar_yt

This Page