real fivethirtyeight / "The Economist" style theme
Hi thanks for your great package! Is there a way to easily (e.g. by theme) make real fivethirtyeight / "The Economist" style plots? This would (most importantly) include:
- left align title with y-axis-tick-labels (see second example below)
- adding a subtitle
- bolder lines than the current default of
theme_538()likematplotlib’s fivethirtyeightstyle - adding a signature bar for e.g. "source" information
- add colored labels to each plot line / bar / ... instead of a legend by default
- colorblind-friendly colors


the source of the screen shot is How to Generate FiveThirtyEight Graphs in Python where all steps are describe to generate a FiveThirtyEight Graphs (manually) directly by matplotlib.
There isn't a way to do it easily. You would even have to drop down into matplotlib to get the exact look! If I remember correctly, 538 used to do their plots in ggplot2, then finish up in inkscape or some other program. With Matplotlib as backend, placing stuff pixel-perfect around the plot can be very finicky, as you can see at the link.
Many thanks for coming back! A full fledged theme for 538 may be over the top (especially the line labeling) . However, some elements would probably be feasible. I am thinking of:
- proper left alignment of title (to some extend already there)
- subtitles
- captions / signature bar (left & right / block alignment); I think this is in the pipeline, right?
- bolder lines than the current default
- (colorblind-friendly colors) -> not too relevant
P.S. interesting that "Fivethirtyeight" uses ggplot2 with inkscape. Would you know what the journal "The Economist" uses?
- proper left alignment of title (to some extend already there)
- subtitles
- captions / signature bar (left & right / block alignment); I think this is in the pipeline, right?
Given what matplotlib gives us to work with, automatic precise alignment is hard and that affects the 3 points above. I will be exploring this area soon and maybe we could do better.
Thanks :-)
We now have a layout manager, this feature could not make the upcoming release but will definitely make the one that follows.
Thanks a lot for the amazing library!
Not sure if this would be covered by the implementation that you have in mind but I think it might be somewhat related. I would love to see the possibility of the legend alignment to be done relative to axis+panel, not just panel.
For example, in the latest release, if you use legend position bottom, the legend will appear below the chart, its center aligned in the same vertical of the center of the panel. I would love to have the possibility of aligning it to the center of the combined size of axis and panel.
To me, this causes that when I glance over the chart, the legend seems to be not correctly aligned since my eyes cannot ignore the presence of the axis. It is something very minor but, at least in my eyes, it makes quite a difference in the aesthetics of charts.