Plot Options#
Data Options#
Parameters |
Description |
---|---|
attr_labels (bool or None, default=None) |
Whether to use an xarray object’s attributes as labels, defaults to None to allow best effort without throwing a warning. Set to True to see warning if the attrs can’t be found, set to False to disable the behavior. |
by (str or list of str or None, default=None) |
Dimension(s) by which to group the data categories.
An NdOverlay is returned by default unless |
dynamic (bool, default=True) |
Whether to return a dynamic plot which sends updates on widget and zoom/pan events or whether all the data should be embedded (warning: for large groupby operations embedded data can become very large if dynamic=False) |
fields (dict, default={}) |
A dictionary of fields for renaming or transforming data dimensions. |
groupby (str or list or None, default=None) |
Dimension(s) by which to group data, enabling widgets.
Returns a DynamicMap if |
group_label (str or None, default=None) |
Label for grouped data, typically in legends or axis labels. |
kind (str, default=’line’) |
The type of plot to generate. |
label (str or None, default=None) |
Label for the data, typically used in the plot title or legends. |
persist (bool, default=False) |
Whether to persist the data in memory when using dask. |
robust (bool or None, default=None) |
If True and clim are absent, the colormap range is computed with 2nd and 98th percentiles instead of the extreme values for image elements. For RGB elements, clips the “RGB”, or raw reflectance values between 2nd and 98th percentiles. Follows the same logic as xarray’s robust option. |
row (str or None, default=None) |
Column name to use for splitting the plot into separate subplots by rows. |
col (str or None, default=None) |
Column name to use for splitting the plot into separate subplots by columns. |
sort_date (bool, default=True) |
Whether to sort the x-axis by date before plotting |
subplots (bool, default=False) |
Whether to display data in separate subplots when using the |
symmetric (bool or None, default=None) |
Whether the data are symmetric around zero. If left unset, the data
will be checked for symmetry as long as the size is less than
|
check_symmetric_max (int, default=1000000) |
Size above which to stop checking for symmetry by default on the data. |
transforms (dict, default={}) |
A dictionary of HoloViews dim transforms to apply before plotting |
use_dask (bool, default=False) |
Whether to use dask for processing the data, helpful for large datasets that do not fit into memory. |
use_index (bool, default=True) |
Whether to use the data’s index for the x-axis by default.
if |
value_label (str, default=’value’) |
Label for the data values, typically used for the y-axis or in legends. |
See this page for more information on these options.
Size And Layout Options#
Parameters |
Description |
---|---|
fontscale (number) |
Scales the size of all fonts by the same amount, e.g. fontscale=1.5 enlarges all fonts (title, xticks, labels etc.) by 50% |
frame_width/frame_height (int) |
The width and height of the data area of the plot |
max_width/max_height (int) |
The maximum width and height of the plot for responsive modes |
min_width/min_height (int) |
The minimum width and height of the plot for responsive modes |
height (int, default=300) |
The height of the plot in pixels |
width (int, default=700) |
The width of the plot in pixels |
padding (number or tuple) |
Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. Supports tuples to specify different amount of padding for x- and y-axis and tuples of tuples to specify different amounts of padding for upper and lower bounds. |
responsive (bool, default=False) |
Whether the plot should responsively resize depending on the size of the browser. Responsive mode will only work if at least one dimension of the plot is left undefined, e.g. when width and height or width and aspect are set the plot is set to a fixed size, ignoring any responsive option. |
Axis Options#
Parameters |
Description |
---|---|
aspect (str or float or None, default=None) |
The aspect ratio mode of the plot. By default, a plot may
select its own appropriate aspect ratio but sometimes it may
be necessary to force a square aspect ratio (e.g. to display
the plot as an element of a grid). The modes ‘auto’ and
‘equal’ correspond to the axis modes of the same name in
matplotlib, a numeric value specifying the ratio between plot
width and height may also be passed. To control the aspect
ratio between the axis scales use the |
data_aspect (float or None, default=None) |
Defines the aspect of the axis scaling, i.e. the ratio of y-unit to x-unit. |
autorange (Literal[‘x’, ‘y’] or None, default=None) |
Whether to enable auto-ranging along the x- or y-axis when zooming. Requires HoloViews >= 1.16. |
flip_xaxis/flip_yaxis (bool or None, default=None) |
Whether to flip the axis left to right or up and down respectively |
framewise (bool, default=True) |
Whether to compute the axis ranges frame-by-frame when using dynamic plots. |
invert (bool, default=False) |
Swaps x- and y-axis |
logx/logy (bool, default=False) |
Enables logarithmic x- and y-axis respectively |
loglog (bool or None, default=None) |
Enables logarithmic x- and y-axis |
rot (number or None, default=None) |
Rotates the axis ticks along the x-axis by the specified number of degrees. |
shared_axes (bool, default=True) |
Whether to link axes between plots |
subcoordinate_y (bool or dict or None, default=None) |
Whether to enable sub-coordinate y systems for this plot. Accepts also a
dictionary of related options to pass down to HoloViews,
e.g. |
title (str or None, default=None) |
Title for the plot |
xaxis/yaxis (str or None) |
Whether to show the x/y-axis and whether to place it at the ‘top’/’bottom’ and ‘left’/’right’ respectively. |
xformatter/yformatter (str or bokeh.TickFormatter or None, default=None) |
Formatter for the x-axis and y-axis (accepts printf formatter, e.g. ‘%.3f’, and bokeh TickFormatter) |
xlabel/ylabel/clabel (str or None, default=None) |
Axis labels for the x-axis, y-axis, and colorbar |
xlim/ylim (tuple or list or None, default=None) |
Plot limits of the x- and y-axis |
xticks/yticks/cticks (int or list or None, default=None) |
Ticks along x-axis, y-axis, and colorbar specified as an integer, list of ticks positions, or list of tuples of the tick positions and labels |
Grid And Legend Options#
Parameters |
Description |
---|---|
colorbar (bool or None, default=None) |
Enables a colorbar. Enabled by default for these plots: bivariate, contour, contourf, heatmap, image, hexbin, quadmesh, polygons. Enabled by default for rasterized plots. |
grid (bool or None, default=None) |
Whether to show a grid |
legend (bool or str or None, default=None) |
Whether to show a legend, or a legend position (‘top’, ‘bottom’, ‘left’, ‘right’) |
Style Options#
Parameters |
Description |
---|---|
bgcolor (str or None, default=None) |
Background color of the data area of the plot |
color (str or list or column name or None, default=None) |
Defines the color(s) to use for the plot. Accepts: - a single color name (e.g., ‘red’, ‘blue’) - a HEX color code (e.g., ‘#ff5733’) - a list of colors for multiple elements - a column name from the dataset to map colors based on values. |
c (str or list or column name or None, default=None) |
Alias for |
cmap (str or list or dict or colormap object or None, default=None) |
The colormap to use for continuous or categorical color mapping. Accepts:
If not specified, a default colormap is automatically chosen based on the data type:
You can override these defaults by explicitly setting |
colormap (str or list or colormap object or None, default=None) |
Alias for |
color_key (str or list or dict or None, default=None) |
Defines a categorical colormap for datashaded plots where distinct
colors must be assigned to different categories. The number of colors
must match or exceed the number of unique categories in the dataset.
Only one of |
clim (tuple or None, default=None) |
Lower and upper bound of the color scale |
cnorm (str, default=’linear’) |
Color scaling which must be one of ‘linear’, ‘log’ or ‘eq_hist’ |
fontsize (number or dict or None, default=None) |
Set title, label and legend text to the same fontsize. Finer control by using a dict: {‘title’: ‘15pt’, ‘ylabel’: ‘5px’, ‘ticks’: 20} |
rescale_discrete_levels (bool or None, default=None) |
If |
Resampling Options#
Parameters |
Description |
---|---|
aggregator (str datashader.Reduction or None, default=None) |
Aggregator to use when applying rasterize or datashade operation (valid options include ‘mean’, ‘count’, ‘min’, ‘max’ and more, and datashader reduction objects) |
datashade (bool, default=False) |
Whether to apply rasterization and shading (colormapping) using the Datashader library, returning an RGB object instead of individual points |
downsample (bool or str or None, default=None) |
Controls the application of downsampling to the plotted data,
which is particularly useful for large timeseries datasets to
reduce the amount of data sent to browser and improve
visualization performance. Requires HoloViews >= 1.16. Additional
dependencies: Installing the Acceptable values:
Other string values corresponding to supported algorithms in HoloViews may also be used. |
dynspread (bool, default=False) |
For plots generated with datashade=True or rasterize=True, automatically increase the point size when the data is sparse so that individual points become more visible |
max_px (int, default=3) |
The maximum size in pixels for dynamically spreading elements in sparse data using |
pixel_ratio (number or None, default=None) |
Pixel ratio applied to the height and width, used when rasterizing or datashading. When not set explicitly, the ratio is automatically obtained from the browser device pixel ratio. Default is 1 when the browser information is not available. Useful when the browser information is not available (pixel_ratio=2 can give better results on Retina displays) or for using lower resolution for speed. |
precompute (bool, default=False) |
Whether to precompute aggregations when using |
rasterize (bool, default=False) |
Whether to apply rasterization using the Datashader library, returning an aggregated Image (to be colormapped by the plotting backend) instead of individual points |
resample_when (int, default=None) |
Applies a resampling operation (datashade, rasterize or downsample) if the number of individual data points present in the current zoom range is above this threshold. The raw plot is displayed otherwise. |
threshold (float, default=0.5) |
When using |
x_sampling/y_sampling (number or None, default=None:) |
Specifies the smallest allowed sampling interval along the x/y axis. Used when rasterizing or datashading. |
Geographic Options#
Parameters |
Description |
---|---|
coastline (bool, default=False) |
Whether to display a coastline on top of the plot, setting coastline=’10m’/’50m’/’110m’ specifies a specific scale. |
crs (str or int or pyproj.CRS or pyproj.Proj or cartopy.CRS or None) |
Coordinate reference system of the data (input projection) specified as a string or integer EPSG code, a CRS or Proj pyproj object, a Cartopy CRS object or class name, a WKT string, or a proj.4 string. Defaults to PlateCarree. |
features (dict or list or None, default=None) |
A list of features or a dictionary of features and the scale at which to render it. Available features include ‘borders’, ‘coastline’, ‘lakes’, ‘land’, ‘ocean’, ‘rivers’ and ‘states’. Available scales include ‘10m’/’50m’/’110m’. |
geo (bool, default=False) |
Whether the plot should be treated as geographic (and assume PlateCarree, i.e. lat/lon coordinates). |
global_extent (bool, default=False) |
Whether to expand the plot extent to span the whole globe. |
project (bool, default=False) |
Whether to project the data before plotting (adds initial overhead but avoids projecting data when plot is dynamically updated). |
projection (str or int or pyproj.CRS or pyproj.Proj or cartopy.CRS or bool or None) |
Coordinate reference system of the plot (output projection) specified as a string or integer EPSG code, a CRS or Proj pyproj object, a Cartopy CRS object or class name, a WKT string, or a proj.4 string. Defaults to PlateCarree. |
tiles (bool or str or xyzservices.TileProvider or holoviews.Tiles or geoviews.WMTS or None, default=False) |
Whether to overlay the plot on a tile source. If coordinate values fall within
lat/lon bounds, auto-projects to EPSG:3857, unless
|
tiles_opts (dict or None, default=None) |
Options to customize the tiles layer created when |
Streaming Options#
Parameters |
Description |
---|---|
backlog (int, default=1000) |
Maximum number of rows to keep in the stream buffer when using a streaming data source. |
stream (holoviews.streams.Stream or None, default=None) |
A stream object for streaming plots, allowing data updates without re-rendering the entire plot. |