Close Menu
  • Breaking News
  • Business
  • Career
  • Sports
  • Climate
  • Science
    • Tech
  • Culture
  • Health
  • Lifestyle
  • Facebook
  • Instagram
  • TikTok
Categories
  • Breaking News (5,555)
  • Business (327)
  • Career (4,675)
  • Climate (222)
  • Culture (4,661)
  • Education (4,898)
  • Finance (220)
  • Health (887)
  • Lifestyle (4,510)
  • Science (4,586)
  • Sports (349)
  • Tech (184)
  • Uncategorized (1)
Hand Picked

Dodgers’ Mookie Betts Announces Career News Amid MLB Offseason

December 12, 2025

Political Memorabilia & Pop Culture Show in Sacramento December 13 | KFBK News Radio

December 12, 2025

Tanker seizure is US tactic “to starve” Venezuela of cash

December 12, 2025

If your parents took you to these 8 places as a kid you definitely grew up lower-middle class – VegOut

December 12, 2025
Facebook X (Twitter) Instagram
  • About us
  • Contact us
  • Disclaimer
  • Privacy Policy
  • Terms and services
Facebook X (Twitter) Instagram
onlyfacts24
  • Breaking News

    Tanker seizure is US tactic “to starve” Venezuela of cash

    December 12, 2025

    UK economy unexpectedly shrunk before Budget

    December 12, 2025

    Save up to 75% on Costco, Sam’s Club and BJ’s memberships

    December 12, 2025

    Magnitude 6.7 earthquake hits Japan’s northeast, tsunami warning issued | Earthquakes News

    December 12, 2025

    Nikkei 225, Nifty 50, Kospi, Hang Seng Index

    December 12, 2025
  • Business

    AI investment is a hot topic in the business community and policy authorities these days. As global ..

    November 26, 2025

    Hedy AI Unveils ‘Topic Insights’: Revolutionizing Business Communication with Cross-Session Intelligence

    November 25, 2025

    Revolutionizing Business Communication with Cross-Session Intelligence

    November 25, 2025

    Parking top topic at Idaho Springs business meeting | News

    November 25, 2025

    Why YouTube Star MrBeast and Netflix Are Launching Theme Parks

    November 23, 2025
  • Career

    Dodgers’ Mookie Betts Announces Career News Amid MLB Offseason

    December 12, 2025

    DVIDS – News – 1st Armored Division holds annual career counselor of the year competition

    December 12, 2025

    Job hopping: Who does it?

    December 12, 2025

    Area career experts aiming to launch ‘The Next Big Thing’ | News

    December 12, 2025

    College career fairs can help defy tough job market

    December 11, 2025
  • Sports

    Collective bargaining for college sports becomes hot topic for athletic directors

    December 12, 2025

    Fanatics Launches a Prediction Market—Without the G-Word

    December 5, 2025

    Mark Daigneault, OKC players break silence on Nikola Topic’s cancer diagnosis

    November 20, 2025

    The Sun ChronicleThunder guard Nikola Topic diagnosed with testicular cancer and undergoing chemotherapyOKLAHOMA CITY (AP) — Oklahoma City Thunder guard Nikola Topic has been diagnosed with testicular cancer and is undergoing chemotherapy..3 weeks ago

    November 19, 2025

    Olowalu realignment topic of discussion at Nov. 18 meeting | News, Sports, Jobs

    November 19, 2025
  • Climate

    PA Environment & Energy Articles & NewsClips By Topic

    December 8, 2025

    ‘Environmental Resilience’ topic of Economic Alliance virtual Coffee Chat Dec. 9

    December 7, 2025

    Insights from World Bank Group Country Climate and Development Reports covering 93 economies

    December 3, 2025

    PA Environment & Energy Articles & NewsClips By Topic

    November 24, 2025

    Environmental Risks of Armed Conflict and Climate-Driven Security Risks”

    November 20, 2025
  • Science
    1. Tech
    2. View All

    Off Topic: Vintage tech can help Gen Z fight digital fatigue

    December 6, 2025

    Snapchat ‘Topic Chats’ Lets Users Publicly Comment on Their Interests

    December 5, 2025

    AI and tech investment ROI

    December 4, 2025

    Emerging and disruptive technologies | NATO Topic

    November 20, 2025

    Gene controls flower color in safflower by influencing pigment production

    December 12, 2025

    Baseball stats sparked his path to data science – News Center

    December 12, 2025

    Pandemic ‘beneath the surface’ has been quietly wiping out sea urchins around the world

    December 12, 2025

    Can Virtual Reality Bring Climate Change Closer to Home? Bay Area Researchers Think So

    December 12, 2025
  • Culture

    Political Memorabilia & Pop Culture Show in Sacramento December 13 | KFBK News Radio

    December 12, 2025

    Zambian women in agriculture: Resilience, culture and celebration

    December 12, 2025

    Newport News approves $3M grant for 2026 music and culture festival

    December 12, 2025

    From bagpipes to salt-making, UNESCO honours endangered culture passed down through generations

    December 12, 2025

    Pope: Cultural diplomacy can build bridges and overcome prejudices

    December 11, 2025
  • Health

    Abortion

    December 12, 2025

    Off Topic: ICE is creating a public health crisis

    December 10, 2025

    Universal Health Coverage Overview

    December 9, 2025

    Billings GazetteVideo: Max Baucus on why health care is a hot topicClick here to view this video from https://billingsgazette.com..36 minutes ago

    December 9, 2025

    Watch Out For Media Rage-Baiting About The Topic Of AI For Mental Health

    December 5, 2025
  • Lifestyle
Contact
onlyfacts24
Home»Science»The Power of Pandas Plots: Backends | by Pierre-Etienne Toulemonde | Aug, 2024
Science

The Power of Pandas Plots: Backends | by Pierre-Etienne Toulemonde | Aug, 2024

August 31, 2024No Comments
Facebook Twitter Pinterest LinkedIn Tumblr Email
0s044sma84zh0u3 Y.jpeg
Share
Facebook Twitter LinkedIn Pinterest Email

Python has a multitude of visualization packages, the three best known of which are: Matplotlib (and seaborn), Plotly, and Hvplot. Each of these 3 packages has its strengths, but requires an entry cost to pay to learn how to use this package, sometimes quite substantial.

The idea for this article came to me when I discovered the Mind Map of Pandas Methods offered by the Daily Dose of Data science newsletter (a newsletter that I highly recommend). I was then discovering the Hvplot visualization package at the same time. I thought the idea of switching from one visualisation backend to another as easily as with Hvplot was brilliant (here is an example to switch from Hvplot to Plotly from Hvplot). Seeing that we could do it with pandas too, I found the idea too interesting not to share it.

Pandas is at the heart of data science in Python, and we all know how to use it. But Matplotlib integrated into Pandas is aging, and is being overtaken both in ease of use and in presentation by other packages. The power of the Pandas visualization backend allows you to take advantage of the latest visualization packages for data exploration and result rendering, without having to invest time in learning these packages, which are nevertheless super powerful!

Pandas was built on 2 packages, Numpy and Matplotlib. This explains why we use Matplotlib scripts to generate graphs, and therefore the generated graphs are matplotlib graphs.

Since its creation, Pandas has evolved and offers the user the possibility to modify the visualization backend used by Pandas.

The 6 available backends that I found during my research are:

  • Plotnine (ggplot2)
  • Plotly
  • Altair
  • Holoviews
  • Hvplot
  • Pandas_bokeh
  • Matplotlib (default backend)

There are several methods available to change a backend::

pd.set_option("plotting.backend", '')
# OR
pd.options.plotting.backend = ''
df.plot(backend='', x='...')

Note: Changing the backend requires Pandas >= 0.25, and sometimes requires specific dependencies to be important, such as with Hvplot below.

Here are 2 examples:

import pandas as pd # Basic packages

pd.options.plotting.backend = "plotly"

df = pd.DataFrame(dict(a=[1,3,2], b=[3,2,1]))
fig = df.plot()
fig.show()

import numpy as np
import pandas as pd # Basic packages

import hvplot
import hvplot.pandas # ! Specific dependency to install

pd.options.plotting.backend = 'hvplot' # Backend modification

data = np.random.normal(size=[50, 2])
df = pd.DataFrame(data, columns=['x', 'y'])

df.plot(kind='scatter', x='x', y='y') # Plotting

2.1. Matplotlib

Matplotlib is the default visualization backend of Pandas. In other words, if you don’t specify a backend, Matplotlib will be used. It is an efficient package to quickly visualize your data to explore it or extract results, but it is aging and is being caught up in both ease of use and rendering power by other packages.

The advantage of Matplotlib is that since Pandas has been built on Matplotlib since its creation, the integration of Matplotlib into pandas is perfect, all matplotlib functions can be used in Pandas.

As a reminder, here are the 11 Matplotlib display methods integrated into Pandas :

  • “area” for area plots,
  • “bar” for vertical bar charts,
  • “barh” for horizontal bar charts,
  • “box” for box plots,
  • “hexbin” for hexbin plots,
  • “hist” for histograms,
  • “kde” for kernel density estimate charts,
  • “density” an alias for “kde”,
  • “line” for line graphs,
  • “pie” for pie charts,
  • “scatter” for scatter plots.

2.2. Plotly

Plotly is a visualization package developed by the company Plotly. The company has developed the framework Plotly.js, to allow interactive visualization of data within Python. The company Plotly also offers the Python dashboarding package Dash.

To use Plotly from Pandas, simply import Plotly express and change the backend:

import pandas as pd
import plotly.express as px # Import packages

df = pd.read_csv("iris.csv")

# Modifying locally Pandas backend
df.plot.scatter(backend = "plotly", x = "sepal.length", y = "sepal.width")

Pandas returns an object with the same type than Plotly:

df.plot.scatter(backend = "plotly", x = "sepal.length", y = "sepal.width") 
# →

px.scatter(x=df["sepal.length"], y = df["sepal.width"])
# →

The advantage is that you can directly integrate a graphic created in Pandas into the Plotly universe, especially Dash!
One limitation is that Plotly’s integration with Pandas is not yet perfect as detailed on the Plotly website (details on the Plotly website).

2.3. Hvplot

Hvplot is an interactive visualization package based on bokeh.
It is an exciting package, which I discovered some time ago and which continues to fascinate me, as much for Hvplot which integrates the notion of backend as in Pandas as for the Holoviz suite and related packages like Panel to create dynamic client-side websites.

Without even the notion of Pandas backend, Hvplot doesn’t require over-learning to start being used, just replace .plot() of Pandas with .hvplot():

import pandas as pd
import hvplot

df = pd.read_csv("iris.csv")

# Plot with Pandas
df.plot.scatter(backend = "hvplot", x = "sepal.length", y = "sepal.width")

# Same plot with hvplot
df.hvplot.scatter(backend = "hvplot", x = "sepal.length", y = "sepal.width")

Using the Hvplot backend is done in the same way as for the Plotly backend, you just need to import a dependency of the Hvplot package:

import numpy as np
import pandas as pd # Basic packages

import hvplot
import hvplot.pandas # Specific dependency to install

pd.options.plotting.backend = 'hvplot' # Backend modification

data = np.random.normal(size=[50, 2])
df = pd.DataFrame(data, columns=['x', 'y'])

df.plot(kind='scatter', x='x', y='y') # Plotting

Like Plotly, charts generated from Pandas with the hvplot backend are of type Hvplot :

df.plot.scatter(backend = "hvplot", x = "sepal.length", y = "sepal.width") 
# →

df.hvplot.scatter(backend = "hvplot", x = "sepal.length", y = "sepal.width")
# →

Hvplot is part of the extremely powerful Holoviz suite with many other associated tools to push data analysis very far, i.e. tools like Panel, geoviews, datashader and others. This type of concordance allows to create graphs from pandas and still be able to take advantage of the Holoviz suite.

Pandas backends are an extremely efficient solution to discover and take advantage of the latest Python visualization packages without having to invest time: in 18 characters including spaces, it is possible to locally transform a standard matplotlib graph into an interactive Plotly graph, and therefore to take advantage of all the benefits of this type of visualization.

However, this solution has certain limitations: it is not suited to highly advanced visualisation objectives that require a great deal of customisation such as advanced visualization in data journalism, because the integration of packages in Pandas is not yet perfect. In addition, this solution only covers visualization packages built on-top of Pandas, and excludes other visualization solutions such as D3.js.

Hvplot is currently my favorite package for visualization: it is extremely easy to get started with at first, works with all the major data manipulation packages (Polars, Dask, Xray, …) and is part of a continuum of applications that allows you to go from graphs to dynamic full client-side websites.

During my research, I didn’t find as much documentation as I expected. I think the concept is great, so I expected a lot of articles. So feel free to tell me in the comments if you find this solution really useful, or if it’s just a cool thing with no real use.

Thanks for reading!

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Gene controls flower color in safflower by influencing pigment production

December 12, 2025

Baseball stats sparked his path to data science – News Center

December 12, 2025

Pandemic ‘beneath the surface’ has been quietly wiping out sea urchins around the world

December 12, 2025

Can Virtual Reality Bring Climate Change Closer to Home? Bay Area Researchers Think So

December 12, 2025
Add A Comment
Leave A Reply Cancel Reply

Latest Posts

Dodgers’ Mookie Betts Announces Career News Amid MLB Offseason

December 12, 2025

Political Memorabilia & Pop Culture Show in Sacramento December 13 | KFBK News Radio

December 12, 2025

Tanker seizure is US tactic “to starve” Venezuela of cash

December 12, 2025

If your parents took you to these 8 places as a kid you definitely grew up lower-middle class – VegOut

December 12, 2025
News
  • Breaking News (5,555)
  • Business (327)
  • Career (4,675)
  • Climate (222)
  • Culture (4,661)
  • Education (4,898)
  • Finance (220)
  • Health (887)
  • Lifestyle (4,510)
  • Science (4,586)
  • Sports (349)
  • Tech (184)
  • Uncategorized (1)

Subscribe to Updates

Get the latest news from onlyfacts24.

Follow Us
  • Facebook
  • Instagram
  • TikTok

Subscribe to Updates

Get the latest news from ONlyfacts24.

News
  • Breaking News (5,555)
  • Business (327)
  • Career (4,675)
  • Climate (222)
  • Culture (4,661)
  • Education (4,898)
  • Finance (220)
  • Health (887)
  • Lifestyle (4,510)
  • Science (4,586)
  • Sports (349)
  • Tech (184)
  • Uncategorized (1)
Facebook Instagram TikTok
  • About us
  • Contact us
  • Disclaimer
  • Privacy Policy
  • Terms and services
© 2025 Designed by onlyfacts24

Type above and press Enter to search. Press Esc to cancel.