fragile.dataviz.stream_plots
Contents
fragile.dataviz.stream_plots
#
Module Contents#
Classes#
Represents a holoviews plot updated with streamed data. |
|
Represents a holoviews plot updated with streamed data. |
|
|
|
|
|
|
|
Create a |
|
Create a |
|
Create a |
|
Create a |
|
Create a |
|
Represents a holoviews plot updated with streamed data. |
|
Plots the interpolated landscaped of values of a set of points. |
|
The |
- class fragile.dataviz.stream_plots.StreamingPlot(plot, stream=None, data=None, bokeh_opts=None, mpl_opts=None, **kwargs)#
Represents a holoviews plot updated with streamed data.
- name =#
- default_opts#
- stream_class#
- default_bokeh_opts#
- default_mpl_opts#
- property opts_kwargs#
- abstract get_default_data()#
- get_default_stream(data)#
- preprocess_data(data)#
Perform the necessary data wrangling for plotting the data.
- send(data)#
Stream data to the plot and keep track of how many times the data has been streamed.
- Return type
None
- init_plot(plot)#
Initialize the holoviews plot to accept streaming data.
- Parameters
plot (Callable) – Callable that returns a holoviews plot.
- Return type
None
- init_stream(stream=None, data=None)#
Initialize the data stream that will be used to stream data to the plot.
- update_kwargs(**kwargs)#
Update the supplied options kwargs with backend specific parameters.
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.Div(data=None, plot=holoviews.Div, **kwargs)#
Bases:
StreamingPlot
Represents a holoviews plot updated with streamed data.
- default_opts#
- name = Div#
- default_bokeh_opts#
- get_default_data()#
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.Table(data=None, plot=holoviews.Table, **kwargs)#
Bases:
StreamingPlot
holoviews.Table
with data streaming capabilities.- default_opts#
- name = table#
- default_bokeh_opts#
- get_default_data()#
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.RGB(data=None, plot=holoviews.RGB, **kwargs)#
Bases:
StreamingPlot
holoviews.RGB
with data streaming capabilities.- name = rgb#
- default_bokeh_opts#
- get_default_data()#
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.Image(data=None, plot=holoviews.Image, **kwargs)#
Bases:
StreamingPlot
holoviews.Image
with data streaming capabilities.- name = image#
- default_bokeh_opts#
- get_default_data()#
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.Curve(data=None, plot=holoviews.Curve, buffer_length=10000, index=False, data_names=('x', 'y'), **kwargs)#
Bases:
StreamingPlot
Create a
holoviews.Curve
plot that plots steaming data.The streaming process is handled using a
Buffer
.- name = curve#
- default_bokeh_opts#
- stream_class#
- get_default_stream(data)#
- get_default_data()#
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.Histogram(data=None, plot=None, n_bins=20, **kwargs)#
Bases:
StreamingPlot
Create a
holoviews.Histogram
plot that plots steaming data.The streaming process is handled using a
Pipe
.- Parameters
n_bins (int) –
- name = histogram#
- default_opts#
- default_bokeh_opts#
- static plot_histogram(data)#
Plot the histogram.
- Parameters
data – Tuple containing (values, bins), xlim. xlim is a tuple containing two typing_.Scalars that represent the limits of the x axis of the histogram.
- Returns
Histogram plot.
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- preprocess_data(data)#
Perform the necessary data wrangling for plotting the data.
- get_default_data()#
- class fragile.dataviz.stream_plots.Bivariate(data=None, plot=holoviews.Bivariate, **kwargs)#
Bases:
StreamingPlot
Create a
holoviews.Bivariate
plot that plots steaming data.The streaming process is handled using a
Pipe
.- name = bivariate#
- default_bokeh_opts#
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- __opts(title='', xlabel='x', ylabel='y', framewise=True, axiswise=True, normalize=True, *args, **kwargs)#
Update the plot parameters. Same as
holoviews
opts
.The default values updates the plot axes independently when being displayed in a
Holomap
.
- get_default_data()#
- class fragile.dataviz.stream_plots.QuadMesh(data=None, plot=None, n_points=20, **kwargs)#
Bases:
StreamingPlot
Create a
holoviews.Histogram
plot that plots steaming data.The streaming process is handled using a
Pipe
.- Parameters
n_points (int) –
- name = quadmesh#
- default_bokeh_opts#
- send(data, xx=None, yy=None, zz=None)#
Stream data to the plot and keep track of how many times the data has been streamed.
- Return type
None
- plot_quadmesh(data)#
Plot the data as an energy landscape.
- Parameters
data – (x, y, xx, yy, z, xlim, ylim). x, y, z represent the coordinates of the points that will be interpolated. xx, yy represent the meshgrid used to interpolate the points. xlim, ylim are tuples containing the limits of the x and y axes.
- Returns
Plot representing the interpolated energy landscape of the target points.
- preprocess_data(data, xx=None, yy=None, zz=None)#
Create the meshgrid needed to interpolate the target data points.
- Parameters
data (Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]) –
- get_default_data()#
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.QuadMeshContours(data=None, levels=16, **kwargs)#
Bases:
QuadMesh
Create a
holoviews.Histogram
plot that plots steaming data.The streaming process is handled using a
Pipe
.- Parameters
levels (int) –
- default_opts#
- default_bokeh_opts#
- plot_quadmesh(data)#
Plot the data as an energy landscape.
- Parameters
data – (x, y, xx, yy, z, xlim, ylim). x, y, z represent the coordinates of the points that will be interpolated. xx, yy represent the meshgrid used to interpolate the points. xlim, ylim are tuples containing the limits of the x and y axes.
- Returns
Plot representing the interpolated energy landscape of the target points.
- send(data, xx=None, yy=None, zz=None)#
Stream data to the plot and keep track of how many times the data has been streamed.
- Return type
None
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.Scatter(data=None, plot=holoviews.Scatter, n_points=20, **kwargs)#
Bases:
StreamingPlot
Represents a holoviews plot updated with streamed data.
- Parameters
n_points (int) –
- default_bokeh_opts#
- default_mpl_opts#
- get_default_data()#
- opts(plot=None, **kwargs)#
Update the plot parameters. Same as holoviews opts.
- class fragile.dataviz.stream_plots.Landscape2D(data=None, contours=True, **kwargs)#
Bases:
StreamingPlot
Plots the interpolated landscaped of values of a set of points.
The data is visualized creating a
holoviews.QuadMesh
with aholoviews.Contours
plot with the original data points displayed as aholoviews.Scatter
.- Parameters
contours (bool) –
- name = landscape#
- default_bokeh_opts#
- init_plot(plot)#
Initialize the holoviews plot to accept streaming data.
- Parameters
plot (Callable) – Callable that returns a holoviews plot.
- Return type
None
- plot_landscape(data)#
Plot the data as an energy landscape.
- Parameters
data – (x, y, xx, yy, z, xlim, ylim). x, y, z represent the coordinates of the points that will be interpolated. xx, yy represent the meshgrid used to interpolate the points. xlim, ylim are tuples containing the limits of the x and y axes.
- Returns
Plot representing the interpolated energy landscape of the target points.
- preprocess_data(data)#
Perform the necessary data wrangling for plotting the data.
- send(data)#
Stream data to the plot and keep track of how many times the data has been streamed.
- Return type
None
- get_default_data()#
- opts(**kwargs)#
Update the plot parameters. Same as holoviews opts.
- __opts(title='Distribution landscape', xlabel='x', ylabel='y', framewise=True, axiswise=True, normalize=True, cmap='default', **kwargs)#
Update the plot parameters. Same as
holoviews
opts
.The default values updates the plot axes independently when being displayed in a
Holomap
.
- class fragile.dataviz.stream_plots.PlotCallback(report_interval=1, **kwargs)#
Bases:
fragile.core.api_classes.Callback
The
Walkers
is a data structure that takes care of all the data involved in making a Swarm evolve.- Parameters
report_interval (int) –
- property report_interval#
- after_evolve()#
- abstract send()#
- abstract panel()#
- run_end()#