Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate matplotlib/seaborn plots to Altair #505

Open
argenisleon opened this issue Apr 21, 2019 · 4 comments

Comments

2 participants
@argenisleon
Copy link
Member

commented Apr 21, 2019

Using Altair, Optimus can output the charts in Vega's JSON format. This gives the users amazing flexibility working with the charts

This charts will be ported:

  • histogram
  • frequency
  • boxplot
  • scatterplot

Also binned scatter plot will be added.

@issue-label-bot

This comment has been minimized.

Copy link

commented Apr 21, 2019

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.92. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@argenisleon argenisleon changed the title Port plots to Altair Migrate matplotlib/seaborn plots to Altair Apr 22, 2019

@argenisleon argenisleon self-assigned this Apr 29, 2019

@argenisleon argenisleon added this to To do in Road to 2.3 via automation Apr 29, 2019

@argenisleon argenisleon moved this from To do to In progress in Road to 2.3 May 6, 2019

@wilmeragsgh

This comment has been minimized.

Copy link
Collaborator

commented May 16, 2019

Hi @argenisleon nice to meet you! Optimus is a really great project thanks for all the things you and @FavioVazquez have put together. Altair looks pretty awesome i've been reviewing it and there are some viz available at other packages as plotly that are currently missing, what about allowing the user to choose the visualization backend ? Because maybe at some point we would like to use plot.ly as well for some specific visualizations as sankey diagrams that aren't on altair, also we would be able to keep up with cutting edge visualizations on main viz projects, what do you think ?
We would have a default one and then for some plots the user couls choose the backend as a parameter of the plotting function

@argenisleon

This comment has been minimized.

Copy link
Member Author

commented May 16, 2019

Hi @wilmeragsgh ,

The main reason to select Altair was how it plays with vega-lite(JSON and Bumblebee https://github.com/ironmussa/bumblebee) and how easy is to use in python compare with matplotlib for example.

We try to create a tiny API so you can use Optimus with any plotting library. For example, you can use
df.cols.scatter(), df.cols.frequency(), df.cols.boxplot() or df.cols.hist() to output a JSON that you can process to adapt the data to any plotting library.

Right now I am not really sure if JSON is the best output format. Maybe we can pass a param to select the output as JSON or pandas? A panda data frame could be a better input for almost all python plotting libraries?

What do you think? A tiny API could help with this?

@wilmeragsgh

This comment has been minimized.

Copy link
Collaborator

commented May 20, 2019

Oh i get it, that's better than i thought then. I think JSON would be easier to identify api output as auxiliar files for visualizations, but pandas persistence could be done in many ways with the pandas.DataFrame.to_* functions and therefore be more flexible to the user's environment. So i'd say pandas to do handle visualization metadata internally and exporting with the formats of pandas.DataFrame.to_* directly, what do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.