Change DPI to Average-TFR plot

Hi :slight_smile:

I want to set the dpi for my TFR plot.

grandAvg_forg.plot(['O1', 'Oz', 'O2'],title='TFR - forgotten',
                          baseline=[-0.40,-0.20], mode='logratio', combine='mean',
                        tmin=-1, tmax=3, show=True, cmap='viridis')

It works for other data when I use plt instead of plot, but with this code I dont know how to set the dpi

Best,
Franzi

You can assign the figure that’s returned to a variable like fig and then do fig.savefig(fname, dpi=300) for instance.

1 Like

Thank you, but I donΒ΄t have fig defined but .plot

grandAvg_forg.plot(...) like most MNE plotting function returns the figure. As @alexrockhill said, you can assign it to a variable. fig = grandAvg_forg.plot(...) and then work on this fig variable to further customize the plot to your liking.

Best,
Mathieu

2 Likes

ohhhh I see,
it worked!
Thank you very much for your help :slight_smile: