0

Have referenced a few links on this subject but still not getting a readable result

Plot all pandas dataframe columns separately

Improve subplot size/spacing with many subplots

I have over 150 columns that I need to view via subplots. but when I apply the code the subplots are compressed in the view to the point where I cannot see anything meaningful

axes = mydata.plot(subplots=True, layout=(22, 7), figsize=(25, 16), sharex=True, sharey=True)

# flatten the axes array to easily access any subplot
axes = axes.flat

# extract the figure object
fig = axes[0].get_figure()

# use tight_layout
fig.tight_layout()

Any guidance would be greatly appreciated

  • 1
    Can you include an example of the problematic plot? To get a feel for the problem. After all, putting 150 plots inside any single plot, unless you're using A0 paper size, will be unreadable. – 9769953 Mar 29 '23 at 10:23
  • 1
    Since you didn't tag this question with Pandas, it might be worth your while trying to manually create the loop and doing everything with Matplotlib/Pyplot directly, instead of relying on Pandas's under-the-hood magic. That way, you may have some more control over the layout, including combining axes etc. – 9769953 Mar 29 '23 at 10:28

0 Answers0