vega / altair

Declarative statistical visualization library for Python
https://altair-viz.github.io/
BSD 3-Clause "New" or "Revised" License
9.23k stars 786 forks source link

Required thank-you to altair team for paper prep #289

Closed jowens closed 6 years ago

jowens commented 7 years ago

https://arxiv.org/abs/1701.01170 (invited submission to ACM TOPC) has 7 figures generated by Altair. Thanks, team! You're the best.

domoritz commented 7 years ago

Wohoo. Thanks for using Altair and Vega-Lite and sending us issues that help us to understand what features let you create better charts!

jakevdp commented 7 years ago

Great to hear! Thanks @jowens

jowens commented 7 years ago

@jakevdp @domoritz Altair team might enjoy looking at Figure 15 in that paper, which we generated from Tableau. This was not our visualization design ("Small Multiple Dot Plot", suggested here, which was awesome: https://policyviz.com/hmv_post/run-time-column-chart/), but was a nice way to present this particular dataset, and is maybe something y'all could think about supporting. (Or maybe it's a snap to do this in Altair already, in which case I'd love to hear it.) I'll just paste it here so you don't have to look it up in the paper.

speedup

jheer commented 7 years ago

Maybe like this? Mark: symbol Y: Dataset Row: Library X: Speedup (log scale axis) Column: Algorithm Color: Speedup < 1

ellisonbg commented 7 years ago

Congrats, the visualizations in the paper are really nice!

jowens commented 7 years ago

You guys like case studies (?) for your docs, IIRC. If you see one where of those visualizations where you think the community would benefit from writing a case study, I'll do that (not necessarily soon, but I'll get to it).

ellisonbg commented 7 years ago

Yes, that would be fantastic to add the the documentation or examples. Could be added two different ways:

I think the notebook+code would be even better. I think @jakevdp has a nice repo with Altair examples that are more complex.

Cheers, Brian

On Fri, Jan 6, 2017 at 4:46 PM, John Owens notifications@github.com wrote:

You guys like case studies (?) for your docs, IIRC. If you see one where of those visualizations where you think the community would benefit from writing a case study, I'll do that (not necessarily soon, but I'll get to it).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/altair-viz/altair/issues/289#issuecomment-271040773, or mute the thread https://github.com/notifications/unsubscribe-auth/AABr0D1MDh-rxBgTF8H2JGU3YaTQNIqoks5rPtJegaJpZM4LcZ0o .

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

jowens commented 7 years ago

I'd do the code (most of the code is Pandas, so I'd squeeze that out in favor of something that's self-contained). But I'd like to hear from one of y'all on the Altair team: "This particular figure in your paper would be most valuable for our efforts."

jakevdp commented 7 years ago

I'll take a closer look to see which figure would be best... if it depends on an external dataset, I'd prefer to keep it out of the docs themselves, but I'd love to have it in the collection of examples here: https://github.com/jakevdp/altair-examples

We might eventually decide to incorporate these examples into the main docs

ellisonbg commented 7 years ago

John, thanks! I though all of them were very impressive and effective. The bw heatmap turned out really well because of the number formatting you did, but some of the other faceted charts work really well.

On Fri, Jan 6, 2017 at 5:58 PM, Jake Vanderplas notifications@github.com wrote:

I'll take a closer look to see which figure would be best... if it depends on an external dataset, I'd prefer to keep it out of the docs themselves, but I'd love to have it in the collection of examples here: https://github.com/jakevdp/altair-examples

We might eventually decide to incorporate these examples into the main docs

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/altair-viz/altair/issues/289#issuecomment-271049305, or mute the thread https://github.com/notifications/unsubscribe-auth/AABr0L8LALvFrqQx9y1k8Oj2LEFkFG_Qks5rPuM-gaJpZM4LcZ0o .

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

jowens commented 7 years ago

Ah, the number formatting is a bad example since I had to do all the formatting outside Altair. But those slackers on the vega-lite team will one day fix that up and it'll be copacetic again.

jowens commented 7 years ago

engines_topc_speedup

jowens commented 7 years ago

Reviews came back today. "The graphs are generally well designed, but not on the whole well sized to ACM Transactions format. Many of them have fonts that impossibly small; one is humorously large." So, I'll have to work on sizing, which I figure I'll have to do manually, but perhaps a future to-do (given a plot size in points or inches or cm, and a desired visual font size, fonts could be automatically sized to achieve that point size?).

jakevdp commented 7 years ago

Thanks for the feedback. I wonder if @kanitw or @domoritz have tips about label/font sizes in Vega-Lite?

jowens commented 7 years ago

@kanitw, @domoritz, @jakevdp any feedback on this set of plots that is what I presume is what the reviewer called "impossibly small"? Is there a way to make Altair (and by extension VL) size up the fonts a little? It's these set of plots:

http://gunrock.github.io/gunrock/doc/latest/md_stats_do_ab_random.html

Presuming I could just add a tickLabelFontSize (?) here—https://github.com/gunrock/io/blob/master/scripts/altair_do_ab_random.py#L105 —but I'd be happy to take suggestions from y'all about better ways to do this.

PDF (from the paper) is here: http://tinyurl.com/mj45z6l In the review version, we had 3 columns of plots, so now I've switched it to 2 columns of plots and made the plots bigger. Still pretty small text though.

jowens commented 7 years ago

@kanitw @domoritz @jakevdp help a brother out with a couple of minutes of your thoughts?

jakevdp commented 7 years ago

I don't know how to change the font size in vega-lite. Maybe one of the others can help.

domoritz commented 7 years ago

@jowens I think rather than bumping up the font sizes one by one, it is easier to use smaller marks and then resize the resulting SVG.

For instance, in the first example in https://gunrock.github.io/gunrock/doc/latest/md_stats_do_ab_random.html, I changed the band size:

"config": {
    "scale": {
      "textBandWidth": 12,
      "bandSize": 12
    }
  },

Does this lead to the desired results?

After:

screen shot 2017-05-11 at 10 34 23

Before:

screen shot 2017-05-11 at 10 34 39
jowens commented 7 years ago

@domoritz this is really helpful, many thanks. One thing I'm noticing is how much horizontal space is taken up by the legend. I would happily place it somewhere else (say, below or above), but that doesn't seem to be available in vega-lite (or altair), happy if you correct me. Seems like I pretty much get "left" or "right". https://vega.github.io/vega-lite/docs/legend.html#legend-config

jheer commented 7 years ago

I'm afraid you're right about that. To customize the legend placement further, you'd need to modify the Vega code generated by Vega-Lite and override the legend's x and y encoding fields. Or, you could simply modify the output SVG directly -- this is easy enough to do by hand, and while a bit of a hassle, it could also be done with a script to ensure reproducible generation of your plot.

jowens commented 7 years ago

Script to munge SVG worked great, thanks @jheer. Want me to file an issue asking for more fine-grained legend-placement control in {altair, vega-lite}?

domoritz commented 7 years ago

@jowens Since Vega already supports legend placement and Vega-Lite inherits all properties, you can customize the position in Vega-Lite 2 (which is in beta right now). It looks like we didn't write complete docs and I filed an issue for that.

However, we won't backport that functionality to Vega-Lite 1 and we need to clean up some things so that Altair can upgrade to Vega-Lite 2.

ellisonbg commented 6 years ago

Are there any action items on this issue? Or can we close as a reference?

domoritz commented 6 years ago

I do that think no there are any action items that won't be addressed as part of Altair 2.

ellisonbg commented 6 years ago

thanks!

jowens commented 6 years ago

Excited about Altair 2! Thanks for pushing it forward!