FranziMNE
(Franziska Leimeister)
June 7, 2023, 2:13pm
1
Hi
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
FranziMNE
(Franziska Leimeister)
June 7, 2023, 3:18pm
3
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
FranziMNE
(Franziska Leimeister)
June 7, 2023, 3:29pm
5
ohhhh I see,
it worked!
Thank you very much for your help