freealg.visualization.ridgeplot#
- freealg.visualization.ridgeplot(sizes, x=None, rho=None, rho_dash=None, eigs=None, ax=None, figsize=None, xlim=None, ylim=None, ylim_factor=1.0, scaley=True, log=False, text_side='left', atom_tol=0.0, cmap=None, c_range=None, hspace=-0.3, nbins=None, bin_factor=10, label_mode='int', rho_color=None, title='', save=False, latex=False)#
Rideplot of a cascade of spectral density functions.
- Parameters:
- sizesarray_like
A list of matrix decompression sizes. The length of this list should be the same as the number of rows of
rho.- xnumpy.array, default=None
The abscissa to plot density. The length of this array should be the same as the number of columns of
rho.- rhonumpy.ndarray, default=None
A 2D array where the row
rho[i, :]correspond to a density at the matrix sizesizes[i]. If this argument is provided, alsoxshould be given.- rho_dashnumpy.ndarray, default=None
Same we
rho, but this is plotted with dashed curves.- eigslist
The list of arrays of empirical eigenvalues corresponding to the submatrices at various sizes. The histogram of
eigs[i]is used to compare againstrho[i, :].- axmatplotlib.axes._axes.Axes
matplotlib’s axis object. This should be a list (or array) of axis objects of the length of the size of
sizes. If None, new axis and figure is created.- figsizetuple, default=None
Figure size as (width, height).
- xlimtuple, default=None
The limits
(x_min, x_max)of the x axis in the plot. If None, minimum and maximum ofxis used.- ylimtuple, default=None
The limits
(y_min, y_max)of the y axis in the plot. If None, the limits are automatically chosen.- ylim_factorfloat, default=1.0
When
ylimis set to None, the y axis limits are automatically set. The upper limit can be changed by this factor. This is effective only ifscaley=Falseandylim=None.- scaleybool, default=True
If True, the density on each axis is scaled independently to fit the axis height. If False, the plots in all axes will the same scale, showing their true comparable scale. This option is effective if
ylim=None.- logbool, default=False
If True, both x and y axis will be in log scale of base 10.
- text_side: {``’left’``, ``’right’``}, default=``’left’``
The placement of the text for the submatrix sizes on each plot.
- atom_tolflaot, default=0.0
A threshold to remove an atom. Values below this value is removed from the histogram generation.
- cmapmatplotlib.cm.cmap, default=None
The colormap used for the color progression for each density curve.
- c_rangedefault=(0, 1)
The range of the
cmapto clip the color range of the colormap.- hspacefloat, default=-0.3
The vertical gap space between axes. Negative makes axes get closer.
- nbinsint, default=None
Number of histogram bins. If None, it is automatically chosen.
- bin_factorint, default=10
A factor to increase the number of bins in the histograms.
- label_mode{
'int','dec','pow-int','pow-dec'}, default='int' Decimal representation in legend labels:
'int': integer.'dec': decimal with only one decimal fraction digit.'pow-int': Integer powers of base 2.'pow-dec': Decimal powers of base 2 with one decimal power.
- rho_colorstr, default=None
The color of
rhocurves.- titlestr, default=’’
Title of the plot.
- savebool or str, default=False
If False, the plot is not saved. If True, the plot is saved with a default filename. If string, the plot is saved with the full-path filename and file extension given by the string.
- latexbool, default=False
If True, the plot is rendered using LaTeX.