MCPcopy Create free account
hub / github.com/holoviz/hvplot / scatter

Method scatter

hvplot/plotting/core.py:384–452  ·  view source on GitHub ↗

The `scatter` plot visualizes your points as markers in 2D space. You can visualize one more dimension by using colors. The `scatter` plot is a good first way to plot data with non continuous axes. Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.

(self, x=None, y=None, **kwds)

Source from the content-addressed store, hash-verified

382 return self(x, y, kind='step', where=where, **kwds)
383
384 def scatter(self, x=None, y=None, **kwds):
385 """
386 The `scatter` plot visualizes your points as markers in 2D space. You can visualize
387 one more dimension by using colors.
388
389 The `scatter` plot is a good first way to plot data with non continuous axes.
390
391 Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.scatter.html
392
393 Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html
394
395 Parameters
396 ----------
397 x : string, optional
398 Field name(s) to draw x-positions from. If not specified, the index is
399 used. Can refer to continuous and categorical data.
400 y : string or list, optional
401 Field name(s) to draw y-positions from. If not specified, all numerical
402 fields are used.
403 marker : string, optional
404 The marker shape depends on the activated plotting backend:
405
406 - Bokeh: Bokeh marker styles and a subset of Matplotlib styles, e.g.
407 ``'circle'`` (default), ``'dot'``, ``'cross'``, ``'x'``, ``'square'``
408 for Bokeh markers and ``'+'``, ``'x'``, ``'s'`` for Matplotlib-
409 compatible markers.
410 See https://docs.bokeh.org/en/latest/docs/examples/basic/scatters/markertypes.html
411 for the list of Bokeh markers.
412 - Matplotlib: Any supported marker, e.g. ``'s'`` (square), ``'x'``
413 (cross), ``'+'``, etc.
414 See https://matplotlib.org/stable/api/markers_api.html for the list
415 of Matplotlib markers.
416 c : string, optional
417 A color or a field name to draw the color of the marker from. Alias of
418 ``color``.
419 s : int, optional, also available as 'size'
420 The size of the marker.
421 scale: number, optional
422 Scaling factor to apply to point scaling. Default is 1.
423 logz : bool
424 Whether to apply log scaling to the z-axis. Default is False.
425 **kwds : optional
426 Additional keywords arguments are documented in :ref:`plot-options`.
427 Run ``hvplot.help('scatter')`` for the full method documentation.
428
429 Returns
430 -------
431 :class:`holoviews:holoviews.element.Scatter` / Panel object
432 You can `print` the object to study its composition and run:
433
434 .. code-block::
435
436 import holoviews as hv
437 hv.help(the_holoviews_object)
438
439 to learn more about its parameters and options.
440
441 References

Calls

no outgoing calls