Matplotlib and ggplot - face_grid text size label

I am using ggplot

the facet_grid function on date

.

p = ggplot(aes(x='meh',weight='mah',fill='type'),data=plot_df) + geom_bar(stat='identity') + facet_grid('date',scales='fixed') + ggtitle(title)

      

I use the following arguments to edit the legend and axis sizes correctly:

t = theme_gray()
t._rcParams['font.size'] = 30 # Legend font size
t._rcParams['xtick.labelsize'] = 30 # xaxis tick label size
t._rcParams['ytick.labelsize'] = 30 # yaxis tick label size
t._rcParams['axes.labelsize'] = 30 # general label size 

p = p + t

      

enter image description here

As you can see from the attached image, the correct labels ( date

) are subtle.

Which of the matplotlib arguments controls this label text size? I can see the custom options for matplotlib here , but since facet_grid

is a function ggplot

, I can't see which of these controls this particular label.

Edit

Example input :

import pandas as pd
from ggplot import *

data_df = pd.read_csv("/dir/sample/input/above/tmp.csv")

print data_df.head()

p = ggplot(aes(x='status',weight='duration_proportion',fill='line_name'),data=data_df) + geom_bar(stat='identity') + labs(x="Service status", y="Percentage time") + facet_grid('date',scales='fixed')

t = theme_gray()

t._rcParams['font.size'] = 30 # Legend font size
t._rcParams['xtick.labelsize'] = 30 # xaxis tick label size
t._rcParams['ytick.labelsize'] = 30 # yaxis tick label size
t._rcParams['axes.labelsize'] = 30 

p = p + t

p.save("test.png" ,height=24,width=44)

      

+3
python matplotlib ggplot2 python-ggplot


source to share


No one has answered this question yet

Check out similar questions:

2030
How do you split a list into uniformly sized chunks?
1667
How can I resize drawings drawn with matplotlib?
1015
Save the image to an image file instead of displaying it with Matplotlib
752
How to make matplotlib laptop IP address
480
Problem installing matplotlib Python
442
How to change font size in matplotlib plot
442
How do I set the font size of the figure title and axis in Matplotlib?
247
Matplotlib make mark labels font size smaller
194
Hiding axis text in matplotlib plots
0
Python plotnine increases distance between marks



All Articles
Loading...
X
Show
Funny
Dev
Pics