|
| | reformat_degree (s) |
| | LATEX FORMATTING OF AXIS AND LEGEND LABELS ###.
|
| |
| | tex_length (string) |
| |
| | obs_latex (obsid) |
| |
| | get_fig_unit_format (reset_cache=False) |
| |
| | format_axis_unit (unit) |
| |
| | format_axis_label (*arg) |
| |
| | format_legend_label (str1, str2=None) |
| |
| | set_xlabel (*arg) |
| |
| | set_ylabel (*arg) |
| |
| | set_disp_axis_label (kname, set_x=False, set_y=False) |
| |
| | get_partext (pval, pname, accuracy=1e-10) |
| | TEXT ELSEWHERE ###.
|
| |
| | add_char_labels (bandchar, axis=None, fig=None, k0=None, xrange=None, yrange=None, size=None, box=True, transform=None) |
| |
| | add_band_labels (eival, bindex, llindex=None, axis=None, fig=None, k0=None, xrange=None, yrange=None, size=None, box=True, transform=None) |
| |
| | set_band_label_2d (label, axis=None) |
| |
| | get_title_position (where, default=(0.5, 0.98, 'center', 'top')) |
| |
| | title_format_auto (title_fmt, title_val, idx=0) |
| |
| str | get_density_text (float dens, Any dscale=None, bool scale_value=True) |
| |
| kdotpy.ploto.toolstext.add_band_labels |
( |
| eival, |
|
|
| bindex, |
|
|
| llindex = None, |
|
|
| axis = None, |
|
|
| fig = None, |
|
|
| k0 = None, |
|
|
| xrange = None, |
|
|
| yrange = None, |
|
|
| size = None, |
|
|
| box = True, |
|
|
| transform = None ) |
Add band labels, band index or (LL index, band index).
Places character labels near the bands at k = 0. If multiple bands bunch up
at the same energy, concatenate the corresponding labels with commas.
Arguments:
eival Array. Eigenvalues, like ddp.eival of a DiagDataPoint instance.
bindex Array. Band indices, like ddp.bindex of a DiagDataPoint instance.
llindex Array. LL indices, like ddp.llindex of a DiagDataPoint instance.
axis matplotlib axis instance in which the band labels should be
drawn; if None, use the current axis
fig matplotlib figure instance in which the band labels should be
drawn; if None, use the current figure
xrange The extent of the horizontal axis. If None, determine
automatically.
yrange The extent of the vertical axis. If None, determine
automatically.
size Font size
box If True, draw a box around the labels.
transform ETransform instance. Transform the energy values to a different
vertical coordinate.
Returns:
matplotlib figure instance.
| kdotpy.ploto.toolstext.add_char_labels |
( |
| bandchar, |
|
|
| axis = None, |
|
|
| fig = None, |
|
|
| k0 = None, |
|
|
| xrange = None, |
|
|
| yrange = None, |
|
|
| size = None, |
|
|
| box = True, |
|
|
| transform = None ) |
Add (band) character labels.
Places character labels near the bands at k = 0. If multiple bands bunch up
at the same energy, concatenate the corresponding labels with commas.
Arguments:
bandchar A dict instance where the keys are the labels and the items the
energy values.
axis matplotlib axis instance in which the band labels should be drawn
drawn; if None, use the current axis
fig matplotlib figure instance in which the band labels should be
drawn; if None, use the current figure
xrange The extent of the horizontal axis. If None, determine
automatically.
yrange The extent of the vertical axis. If None, determine
automatically.
size Font size
box If True, draw a box around the labels.
transform ETransform instance. Transform the energy values to a different
vertical coordinate.
Returns:
matplotlib figure instance.
| kdotpy.ploto.toolstext.format_legend_label |
( |
| str1, |
|
|
| str2 = None ) |
Format legend label from one or two strings.
Arguments:
str1, str2 One or two arguments, each being str or None. If str2 is None,
try to parse str1 as observable id. Otherwise, interpret str1
and str2 as strings for quantity and unit, respectively.
Returns:
label String. TeX formatted string suitable as label for a legend (color
bar).
| kdotpy.ploto.toolstext.get_partext |
( |
| pval, |
|
|
| pname, |
|
|
| accuracy = 1e-10 ) |
TEXT ELSEWHERE ###.
Determine the auxiliary label (placed in the upper left corner, usually)
Arguments:
pval Numeric, Vector instance, or None. The parameter value. If None,
return the empty string.
pname String. The parameter/variable name. This may be a variable
component like 'kx'.
accuracy Positive float. If the parameter value is smaller in absolute
value, use the value 0.
Returns:
TeX-formatted parameter text
| kdotpy.ploto.toolstext.set_disp_axis_label |
( |
| kname, |
|
|
| set_x = False, |
|
|
| set_y = False ) |
Determine the label for the x axis (dispersion plots, etc.)
This function takes the variable component, e.g., 'kx', and formats it into
an axis label with units if appropriate. It can also apply the axis label
immediately to the x and/or y axis in the current figure.
Arguments:
kname String. The vector component, for example 'kx'.
set_x True or False. Whether to set the axis label as xlabel.
set_y True or False. Whether to set the axis label as ylabel.
Returns
TeX-formatted string for the axis label.