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 · 6 comments
Open

Migrate matplotlib/seaborn plots to Altair #505

argenisleon opened this issue Apr 21, 2019 · 6 comments
Assignees

Comments

@argenisleon
Copy link
Collaborator

argenisleon 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
Copy link

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
@wilmeragsgh
Copy link

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
Copy link
Collaborator Author

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
Copy link

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 ?

@dclong
Copy link

dclong commented Aug 8, 2019

How about the support of HoloViews? It is a great visualization library for Python.

@argenisleon
Copy link
Collaborator Author

Hi @dclong ,

We like Altair because is json friendly and have the charts that Optimus needs.
Is there a specific reason why do you consider HoloViews?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants