antaress.ANTARESS_plots.utils_plots module#

custom_axis(plt, ax=None, fig=None, position=None, colback=None, x_range=None, y_range=None, z_range=None, autom_x=False, autom_y=False, autom_z=False, x_mode=None, y_mode=None, z_mode=None, xmajor_log_n=1.0, ymajor_log_n=1.0, zmajor_log_n=1.0, x_title=None, y_title=None, z_title=None, x_title_dist=None, y_title_dist=None, z_title_dist=None, no_xticks=False, no_yticks=False, no_zticks=True, top_xticks=None, right_yticks=None, hide_xticks=False, hide_yticks=False, xmajor_int=None, xminor_int=None, ymajor_int=None, yminor_int=None, zmajor_int=None, zminor_int=None, xmajor_form=None, ymajor_form=None, zmajor_form=None, xmajor_length=None, ymajor_length=None, zmajor_length=None, xminor_length=None, yminor_length=None, zminor_length=None, font_size=None, font_thick=None, xfont_size=None, yfont_size=None, zfont_size=None, axis_thick=None, xmajor_thick=None, xminor_thick=None, ymajor_thick=None, yminor_thick=None, zmajor_thick=None, zminor_thick=None, dir_x=None, dir_y=None, dir_z=None, xtick_pad=None, ytick_pad=None, ztick_pad=None, xlab_col=None, ylab_col=None, zlab_col=None, hide_axis=None, tight_layout=False, invert_xaxis=False, invert_yaxis=False, invert_zaxis=False, right_axis=False, secy_title=None, secy_range=None, secy_title_dist=None, no_secyticks=None, secymajor_int=None, dir_secy=None, secyfont_size=None, secymajor_length=None, secymajor_thick=None, secyminor_length=None, secyminor_thick=None, secymajor_form=None, secyminor_int=None, secylab_col=None)[source]#

Plot axis.

General routines to set up plot axis to default or user-selected values.

Parameters:

TBD

Returns:

None

scaled_title(sc_fact10, y_title)[source]#

Title scaling.

Applies power-of-ten scaling to title value.

Parameters:
  • sc_fact10 (int) – power of ten scaling

  • y_title (str) – title

Returns:

y_title (str) – title preceded by scaling value

autom_range_ext(ax_range_in, ax_min, ax_max, ext_fact=0.05)[source]#

Automatic range.

Defines axis range automatically.

Parameters:
  • ax_range_in (list) – axis range to be set, if user-defined

  • ax_min (float) – minimum value on the axis

  • ax_max (float) – maximum value on the axis

  • ext_fact (float) – extension of axis on both sides compared to min and max values

Returns:

ax_range (list) – axis range

autom_tick_prop(dax_range)[source]#

Automatic ticks.

Defines tick spacings and format automatically.

Parameters:

dax_range (float) – axis extension

Returns:
  • axmajor_int (float) – major ticks spacing

  • axminor_int (float) – minor ticks spacing

  • axmajor_form (str) – major tick format

autom_logtick_prop(ax_range)[source]#

Automatic ticks for log axis.

Defines tick spacings automatically. Ticks are placed at (10**n)**i with i consecutive integers self-determined by the plot.

Parameters:

ax_range (float) – axis boundaries

Returns:

axmajor_int (int) – major ticks spacing

adjust_isosize(real_bounds, xpos0, ypos0, xpos1, ypos1, max_window_size)[source]#

2D isotropic plot scaling.

Adjusts the size and position of the plot window, maintaining isotropy.

Variables along the X and Y axis must have the same units.

The lower left corner of the plot at (xpos0,ypos0) is taken as reference. The (x_pos1,y_pos1) defines the maximum extension of the plot at the top right corner. Depending on the respective width/height of the original plot, the larger side (within the axes) is scaled to max_window_size while the smallest side is then scaled by isotropy.

Parameters:

TBD

Returns:

TBD

adjust_3D_isosize(ax, x_range, y_range, z_range)[source]#

3D isotropic plot scaling.

Adjusts the size of the plot window, maintaining isotropy.

Parameters:

TBD

Returns:

TBD

truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100)[source]#

Colormap truncation.

Limits colormap to the chosen range for the plotted variable.

Parameters:

TBD

Returns:

TBD

stackrel(val, sub, sup, form)[source]#

Stackrel truncation.

Print value with upper and lower error bars.

Parameters:

TBD

Returns:

TBD

mscatter(plt, x, y, ax=None, m=None, **kw)[source]#

Multiple markers.

Overrides plt.scatter to have various markers in one command.

Parameters:

TBD

Returns:

TBD

plot_shade_range(ax, shade_range, x_range_loc, y_range_loc, mode='fill', facecolor='grey', zorder=-1, alpha=0.2, compl=False)[source]#

Shaded ranges.

Shades list of ranges.

Parameters:

TBD

Returns:

TBD