yt.extensions.eps_writer.DualEPS.scale_line

DualEPS.scale_line(size=0.20000000000000001, label='', loc=(0.050000000000000003, 0.080000000000000002), labelloc='top', color=<pyx.color.cmyk instance at 0x10502d248>, linewidth=<pyx.style.linewidth instance at 0x1050128c0>)

Draws a scale line in the current figure.

Parameters :

size : float

Length of the scale line in units of the figure size.

label : string

Annotation label of the scale line.

loc : tuple of floats

Location of the left hand side of the scale line in units of the figure size.

labelloc : string

Location of the label with respect to the line. Can be “top” or “bottom”

color : pyx.color.*.*

Color of the scale line. Example: pyx.color.cymk.white

linewidth : pyx.style.linewidth.*

Width of the scale line. Example: pyx.style.linewidth.normal

Examples

>>> d = DualEPS()
>>> d.axis_box(xrange=(0,100), yrange=(1e-3,1), ylog=True)
>>> d.insert_image("image.jpg")
>>> d.scale_line(size=0.2, label="1 kpc", loc=(0.05, 0.1))
>>> d.save_fig()

Previous topic

yt.extensions.eps_writer.DualEPS.save_fig

Next topic

yt.extensions.eps_writer.DualEPS.title_box

This Page