question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API: engine kw to .plot to enable selectable backends

See original GitHub issue

We have had some conversations in the past regarding an .plot(....., engine=) kw. in #8018 This would allow pandas to redirect the plotting to a user selectable back-end, keeping matplotlib as the default.

see chartpy here, for a way to selectively enable matplotlib, bokeh and plotly.

and generically via altair.

Missing from here is when to re-direct to seaborn.

So this issue is for discussion:

  1. should we do this
  2. implementation method and minimalist dependencies to actually do this (ideally pandas would add NO dependences itself, just import for a particular engine, raising if its not available).
  3. maybe should spin off much of the current pandas code into a separate repo (pandas-plot)? and this actually should be the default (rather than matplotlib), which is of course the dependency. This might allow simply removing the vast majority of the custom plotting code.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:31 (25 by maintainers)

github_iconTop GitHub Comments

2reactions
trxcllntcommented, Oct 3, 2017

@rgbkrk heads up, our Arrow lib is now part of the official Apache/Arrow project. The package name on npm will stay the same, intending to release 0.1.3 in the next few days 🎉

2reactions
ellisonbgcommented, Oct 3, 2017

Sorry I wasn’t clear - I would keep the data separate and only specify the visual encodings, marks, etc in the JSON. The actual data transfer could be done with either arrow or full pandas data frames. The rendering libraries could deal with the combination of JSON viz spec + DataFrame

On Tue, Oct 3, 2017 at 1:50 PM, Peter Wang notifications@github.com wrote:

@ellisonbg https://github.com/ellisonbg you bring up an interesting point, that if the Pandas devs want to “own plotting”, then outputting a JSON-based visualization spec would be the most flexible and accurate approach to doing that. However, the roundtrip through JSON-land is nontrivial - not merely from a logical mapping perspective, but also from the perspective of performance. In the most common case, directly calling matplotlib on a large dataframe is extremely fast. Similarly, there’s no reason why Datashader or Bokeh server can’t also be similarly fast on large dataframes. However, round-tripping those datasets through an encode/decode process to JSON would be quite painful. (And that’s not even considering the use cases of e.g. GeoPandas, with tons of shape geometry data.)

My understanding is that the Pandas devs already have a plotting API on the plot object, namely, the [‘area’, ‘bar’, ‘barh’, ‘box’, ‘density’, ‘hexbin’, ‘hist’, ‘line’, ‘pie’, ‘scatter’] methods, which defines their expectations of the API that the plotting backends must adhere to. At that point, it’s on the viz library developers to properly implement those functions.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pandas-dev/pandas/issues/14130#issuecomment-333973951, or mute the thread https://github.com/notifications/unsubscribe-auth/AABr0FhD7EDH8cy1FmxfII3mpXZ_zcwnks5sop37gaJpZM4Jxxtq .

– Brian E. Granger Associate Professor of Physics and Data Science Cal Poly State University, San Luis Obispo @ellisonbg on Twitter and GitHub bgranger@calpoly.edu and ellisonbg@gmail.com

Read more comments on GitHub >

github_iconTop Results From Across the Web

Backends - Julia Plots
Backends are the lifeblood of Plots, and the diversity between features, ... Plotly JavaScript API. plotly() is the only dependency-free plotting option, ...
Read more >
Release 1.7.3 The HyperSpy Developers - Read the Docs
backend that enables interactive plotting embedded in the jupyter notebook. Note: When running in a headless system it is necessary to set ...
Read more >
pyplot — Matplotlib 2.0.2 documentation
Provides a MATLAB-like plotting framework. pylab combines pyplot with numpy into a single namespace. This is convenient for interactive work, but for ...
Read more >
Azure API Management backends | Microsoft Learn
Configure and manage custom backends in the Azure portal, or using Azure APIs or tools. After creating a backend, you can reference the...
Read more >
pyrolite Documentation
It is with this mindset that pyrolite is built, to better enable you to make use of ... to plotting functions via the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found