-
Book Overview & Buying
-
Table Of Contents
Python in Excel for Data Analytics
By :
Throughout this chapter, you have been creating charts one at a time and viewing them in the Excel grid. In this final section, we will look at a few additional techniques for managing and displaying your visualizations within Excel.
By default, seaborn charts are rendered at a standard size, which may be too small or too large depending on your needs. You can control the figure size by calling plt.figure() before creating your chart:
plt.figure(figsize=(10, 6))
sns.boxplot(x='origin', y='mpg', data=mpg_df)
plt.title('Fuel Efficiency by Origin')
The resized chart is shown in Figure 3.21:

Figure 3.21: A box plot with a custom figure size
Increasing the size gives your chart more room to breathe, which is especially helpful when working with multiple groups, legends, or longer labels.
So far, we have been adjusting a single chart at a time. But often, you may want to compare the same chart across...