Option to make all fontsizes in your plot with the same scale larger (like in seaborn)
See original GitHub issueIt would be great in Holoviews if you would have a nice, easy and fast way to make your plot more readable without having to specify every fontsize for every part of the plot separately.
Seaborn has the option to scale all your fontsizes (such as title, xlabel, ylabel, xticks etc) with the same factor, like this:
import seaborn as sns
sns.set(font_scale=2.0)
This will not set all fontsizes to the same size, but rather multiply every separate fontsize with the same factor.
Currently you have to do in Holoviews:
my_plot.opts(fontsize={'title': 20, 'yticks': 14, 'xticks': 14, 'xlabel': 16})
This is great if you want to define your plot precisely, but not if you want to rapidly change your plot.
(solution could be something like my_plot.opts(fontscale=2.0)
or hv.output(fontscale=200)
, but these are just suggestions.)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Fine control over the font size in Seaborn plots - Stack Overflow
My font size in my paper is 9pt and I would like to make sure the font size in my plots are either...
Read more >4 Different Methods for Changing the Font Size in Python ...
On a plot created by these 3 functions, we can change the font sizes of axis labels using the set_axis_labels function.
Read more >How to Change Font Size in Seaborn Plots (With Examples)
You can use the following basic syntax to change the font size in Seaborn plots: import seaborn as sns sns.set(font_scale=2).
Read more >How to change Seaborn legends font size, location and color?
This is one of the easiest methods to change the font size of any Seaborn legends, in this we just have to pass...
Read more >Controlling figure aesthetics — seaborn 0.12.1 documentation
You can also independently scale the size of the font elements when changing the context. (This option is also available through the top-level...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Turns out it’s harder to implement than expected since holoviews doesn’t have the default fontsizes available in
self
(https://github.com/holoviz/holoviews/blob/master/holoviews/plotting/plot.py#L512 simply returns an empty dict if None) and I think to get the defaults, you need to either hardcode the defaults or render the figure and painstakingly retrieve the attributes (p.title.text_fontsize, p.xlabel.axis_label_text_font_size, etc) for multiple backends.One workaround for bokeh is doing
fontsize={'ticks': '200%', 'labels': '200%'}
As in hardcode the defaults or render the plots each time to get the default?