visualize

class pydaddy.visualize.Visualize(op_x, op_y, op, autocorrelation_time, **kwargs)

Bases: pydaddy.metrics.Metrics

Module to visualize and plot analysed data

_acf_plot(ax, acf, lags, a, b, c, act, title)
_acf_plot_multi(ax, acf1, acf2, lags, act1, act2, title=None)
_histogram3d(x, bins=20, normed=False, color='blue', alpha=1, hold=False, plot_hist=False)

Plotting a 3D histogram

Parameters
  • sample (array_like.) – The data to be histogrammed. It must be an (N,2) array or data that can be converted to such. The rows of the resulting array are the coordinates of points in a 2 dimensional polytope.

  • bins (sequence or int, optional, default: 10.) –

    The bin specification:

    • A sequence of arrays describing the bin edges along each dimension.

    • The number of bins for each dimension (bins =[binx,biny])

    • The number of bins for all dimensions (bins = bins).

  • normed (bool, optional, default: False.) – If False, returns the number of samples in each bin. If True, returns the bin density bin_count / sample_count / bin_volume.

  • color (string, matplotlib color arg, default = 'blue') –

  • alpha (float, optional, default: 1.) – 0.0 transparent through 1.0 opaque

  • hold (boolean, optional, default: False) –

Returns

  • H (ndarray.) – The bidimensional histogram of sample x.

  • edges (list.) – A list of 2 arrays describing the bin edges for each dimension.

Examples

>>> r = np.random.randn(1000,2)
>>> H, edges = np._histogram3d(r,bins=[10,15])
_km_plot(ax, km_2, km_4, title)
_matrix_plot(ax, mat)
_noise_plot(ax, residual, title)
_noise_plot_2d(ax, res_x, res_y, title)
_plot_3d_hisogram(Mx, My, ax=None, title='PDF', xlabel='$M_{x}$', ylabel='$M_{y}$', zlabel='Frequency', tick_size=12, title_size=14, label_size=10, label_pad=12, r_fig=False, dpi=150)

Plot 3d bar plot

_plot_autocorrelation_1d(lags, acf)
_plot_autocorrelation_2d(lags, acfx, acfy, acfm, ccf)
_plot_data(data_in, title='title', x_label='$m_x$', y_label='$m_y$', z_label='z', zlim=None, ax=None, clear=True, legend=False, plot_plane=False, tick_size=12, title_size=16, label_size=14, label_pad=12, label=None, order=3, m=False, m_th=2, dpi=150, heatmap=False)

Plot data on a 3d axis

_plot_heatmap(data, title='title', num_ticks=5)

Plots heatmap of data

_plot_histograms(timeseries, vector, heatmap=False, dpi=150, kde=False, title_size=14, label_size=15, tick_size=12, label_pad=8, **plot_text)

Plot histogram figures

_plot_noise_characterstics(data, dpi=150, kde=True, title_size=14, tick_size=15, label_size=15, label_pad=8)

Plot noise charactersitic figure

_plot_summary(data, vector=True, kde=False, tick_size=12, title_size=15, label_size=15, label_pad=8, n_ticks=3, timeseries_start=0, timeseries_end=1000, **plot_text)

Plots the summary chart

_plot_timeseries(timeseries, vector, start=0, stop=1000, n_ticks=3, dpi=150, tick_size=12, title_size=14, label_size=14, label_pad=0, **plot_text)

Plots timeseries figure

_qq_plot(ax, residual, title)
_remove_nans(Mx, My)

Remove nan’s from data

_set_zaxis_to_left(ax)

Sets the z-axis of 3d figure to left

_slider_2d(slider_data, init_pos=0, limits=None, prefix='Dt', **plot_text)

Get slider for analysed scalar data

_slider_3d(slider_data, init_pos=0, prefix='dt', zlim=None, order=None, polar=False, **plot_text)

Get slider for analysed vector data.

_stylize_axes(ax, x_label=None, y_label=None, title=None, tick_size=20, title_size=20, label_size=20, label_pad=12)

Beautify the plot axis

_thrace_pane(data)

Thrace an arbetery surface that covers the data points.

Notes

To be used only to get a better visual of the shape of the surface.

_update_axis_range(ax, x, both=True)