pySW4.plotting.utils module

Python module with general utilities for making plotting easier.

author:Shahar Shani-Kadmiel (s.shanikadmiel@tudelft.nl)
copyright:Shahar Shani-Kadmiel
license:This code is distributed under the terms of the GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html)
pretty_ticks(min, max, number_of_ticks=2, show_zero=False)[source]

Function for controlling tickmarks.

Parameters:

min : int or float

Minimum value to tick on the axis.

max : int or float

Maximum value to tick on the axis.

number_of_ticks : int

The number of tickmarks to plot. Must be > 2.

show_zero : bool

If set to True the zero tickmark will be plotted.

Returns:

ndarray

A 1d array with tickmark values.

set_matplotlib_rc_params()[source]

Set matplotlib rcparams for plotting