{"id":5254,"library":"hvplot","title":"hvplot","description":"hvplot is a high-level plotting API for the PyData ecosystem built on HoloViews. It provides a familiar API, similar to Pandas' `.plot()` method, to generate interactive and compositional plots from various data structures like Pandas DataFrames, Xarray DataArrays, Dask, GeoPandas, and Polars. It supports Bokeh (default), Matplotlib, and Plotly backends and is actively developed with frequent patch releases and minor versions.","status":"active","version":"0.12.2","language":"python","source_language":"en","source_url":"https://github.com/holoviz/hvplot","tags":["plotting","visualization","holoviz","pandas","xarray","geospatial","interactive","data science"],"install":[{"cmd":"pip install hvplot","lang":"bash","label":"Using pip"},{"cmd":"conda install conda-forge::hvplot","lang":"bash","label":"Using Conda"}],"dependencies":[{"reason":"hvplot is built on HoloViews, requiring it as a core dependency for plot generation and backend management.","package":"holoviews"},{"reason":"Widely used as a primary data source for hvplot's DataFrame-like plotting API.","package":"pandas"},{"reason":"The default and most commonly used interactive plotting backend for hvplot.","package":"bokeh"},{"reason":"Provides .hvplot accessors for working with labeled multi-dimensional arrays.","package":"xarray","optional":true},{"reason":"Enables plotting of larger-than-memory datasets by integrating with Dask DataFrames.","package":"dask","optional":true},{"reason":"Adds geospatial plotting capabilities and accessors for GeoDataFrames.","package":"geopandas","optional":true},{"reason":"Optional backend for generating static plots.","package":"matplotlib","optional":true},{"reason":"Optional backend for generating interactive plots with Plotly.","package":"plotly","optional":true},{"reason":"Recommended for efficiently visualizing large datasets, especially for rasterization.","package":"datashader","optional":true}],"imports":[{"note":"Imports the hvplot accessor onto the respective data structures, making the .hvplot method available. This also loads the Bokeh extension by default.","symbol":".hvplot accessor","correct":"import hvplot.pandas\n# or hvplot.xarray, hvplot.dask, etc."},{"note":"Plotting extensions (backends) are loaded via `hvplot.extension()` after importing a data accessor, not directly as a top-level module.","wrong":"import hvplot.matplotlib","symbol":"hvplot.extension","correct":"import hvplot.pandas\nhvplot.extension('matplotlib')"},{"note":"While `.show()` might implicitly work in some environments, for explicit display outside of notebooks or for more control, `hvplot.show()` (or `bokeh.plotting.show(hv.render(plot_object))` from HoloViews/Bokeh) is the correct pattern.","wrong":"plot_object.show()","symbol":"hvplot.show","correct":"from hvplot import show\n# ... create plot ...\nshow(plot_object)"}],"quickstart":{"code":"import pandas as pd\nimport numpy as np\nimport hvplot.pandas # noqa\n\ndf = pd.DataFrame(\n    np.random.randn(100, 4), \n    index=pd.date_range('1/1/2000', periods=100),\n    columns=list('ABCD')\n).cumsum()\n\ndf.hvplot.line(y='A', title='Interactive Line Plot of Column A')","lang":"python","description":"This quickstart demonstrates how to import hvplot for Pandas DataFrames and create a basic interactive line plot using the familiar `.hvplot` accessor."},"warnings":[{"fix":"Replace `hover_formatters` with `hover_tooltips`. For DuckDB objects, ensure you import `hvplot.duckdb` to enable the accessor: `import hvplot.duckdb`.","message":"The `hover_formatters` argument is deprecated in favor of `hover_tooltips`. Additionally, passing `DuckDB` objects directly to `hvplot.plotting.plot` is discouraged; users should instead `import hvplot.duckdb` to enable proper integration.","severity":"deprecated","affected_versions":"0.12.0+"},{"fix":"Ensure Bokeh and HoloViews are up-to-date. In problematic Jupyter environments, a page refresh might resolve it. For external IDEs, consider rendering the plot to an HTML file or serving it explicitly using `hvplot.show()` (which wraps HoloViews/Bokeh rendering utilities).","message":"hvplot outputs, especially with Bokeh or Plotly backends, may not display immediately or at all in some IDEs (like PyCharm) or Jupyter environments (requiring a page refresh) due to their limited notebook integration or specific HoloViews/Bokeh version incompatibilities.","severity":"gotcha","affected_versions":"All versions, particularly with older HoloViews/Bokeh combinations (e.g., HoloViews 1.18.1 with Bokeh 3.3.2)."},{"fix":"For full interactivity and broader feature support, prefer the Bokeh or Plotly backends. If Matplotlib is required, consult the documentation for supported plot types and options, and `.compute()` Dask DataFrames before plotting.","message":"Some advanced plotting options, such as `subplots=True` for `hist` or `hexbin` plots, may have limited or no support with the Matplotlib backend. When plotting Dask DataFrames with Matplotlib, explicit computation (`.compute()`) might be necessary to avoid errors or blank plots.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If upgrading from `<0.11.0`, be aware that existing code for manual projection with `tiles=True` might now be redundant or conflict with the new automatic behavior. Review and potentially remove manual projection steps for `tiles=True` plots.","message":"For geographic plots with `tiles=True`, `hvplot>=0.11.0` automatically converts latitude/longitude to Web Mercator. Prior to `v0.11.0`, manual projection using utilities like `holoviews.util.transform.lon_lat_to_easting_northing` was often required.","severity":"breaking","affected_versions":"<0.11.0 (requires manual projection), 0.11.0+ (automatic projection)"},{"fix":"Consider overlaying a scatter plot (`.hvplot.scatter()`) to show individual data points. Ensure Bokeh and HoloViews are up-to-date, as some rendering issues (e.g., with WebGL) might be fixed in newer versions. Filtering out `NaN` values or interpolating might also be options depending on data requirements.","message":"Line plots of time series or sparse data with `NaN` values may exhibit 'disappearing lines' when zooming in, especially if single data points are surrounded by `NaN`s, as a line requires at least two points. This can sometimes be exacerbated by WebGL rendering in older Bokeh versions.","severity":"gotcha","affected_versions":"All versions, potentially worse with older Bokeh/HoloViews"}],"env_vars":null,"search_vec":"'activ':56 'api':9,21 'backend':53 'bokeh':48 'built':14 'composit':31 'dask':42 'data':35,72 'dataarray':41 'datafram':39 'default':49 'develop':57 'ecosystem':13 'familiar':20 'frequent':59 'generat':28 'geopanda':43 'geospati':70 'high':6 'high-level':5 'holoview':16 'holoviz':67 'hvplot':1,2 'interact':29,71 'level':7 'like':37 'matplotlib':50 'method':26 'minor':63 'panda':24,38,68 'patch':60 'plot':8,25,32,52,65 'polar':45 'provid':18 'pydata':12 'releas':61 'scienc':73 'similar':22 'structur':36 'support':47 'various':34 'version':64 'visual':66 'xarray':40,69","created_at":"2026-04-14T01:25:52.271162+00:00","updated_at":"2026-04-16T15:39:05.853523+00:00","problems":[{"fix":"Ensure HoloViews is installed and updated to a compatible version. It's often best to upgrade both hvplot and holoviews.\n`pip install -U holoviews hvplot`","cause":"hvplot relies on HoloViews, and this error occurs when the 'holoviews' package is either not installed or its version is incompatible with the installed hvplot version.","error":"ModuleNotFoundError: No module named 'holoviews'"},{"fix":"Import the specific hvplot accessor for your data structure. For Pandas DataFrames, use:\n`import hvplot.pandas`","cause":"This error typically means that the `hvplot` accessors (like `.hvplot` for Pandas DataFrames) have not been correctly registered. This usually happens if `hvplot.pandas` (or the equivalent for other data types like `hvplot.xarray`) has not been imported.","error":"AttributeError: 'DataFrame' object has no attribute 'hvplot'"},{"fix":"Ensure all related HoloViz libraries (bokeh, holoviews, panel, hvplot) are updated to compatible versions, ideally by upgrading them together. Sometimes, disabling WebGL rendering in Bokeh can also resolve display issues.\n`pip install -U bokeh holoviews panel hvplot`\n`import holoviews as hv`\n`hv.renderer('bokeh').webgl = False`","cause":"This error, often seen in Jupyter environments, indicates a version incompatibility or missing components among Bokeh, HoloViews, Panel, and hvplot, which are all part of the HoloViz ecosystem.","error":"TypeError: Bokeh is undefined Panel: ERROR: Unable to run Panel code because Bokeh or Panel library is missing."},{"fix":"Update your code to use the simplified `.opts()` syntax, or if separating options is necessary, use `hv.opts.apply_groups` for backward compatibility. Refer to the HoloViews documentation for the current recommended approach.\n`# Old (deprecated) way:`\n`df.hvplot.line().opts(plot=dict(width=400), norm=dict(axiswise=True))`\n`# New way:`\n`df.hvplot.line().opts(width=400, axiswise=True)`","cause":"This is a deprecation warning indicating that the way options are being passed to the `.opts()` method is outdated. HoloViews (which hvplot builds upon) has a newer, simplified syntax for applying plot options.","error":"WARNING:param.main: Calling the .opts method with options broken down by options group (i.e. separate plot, style and norm groups) is deprecated."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.12.2","cli_name":"","cli_version":null,"type":"library","homepage":"https://hvplot.holoviz.org","github":"http://github.com/holoviz/hvplot","docs":null,"changelog":null,"pypi":"https://pypi.org/project/hvplot/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-30","next_check":"2026-07-28","install_tag":null}}