Skip to content

Commit

Permalink
Commented 3D plot tempfile hack out
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Nov 11, 2019
1 parent 7c60e58 commit 4e8097b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion samri/plotting/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,12 +671,15 @@ def _plots_overlay(display,display_3Dplot):
image array.
"""

#get matplotlib figure from Nilearn.OrthoSlicer2 object
fh = display.frame_axes.get_figure()
fh.canvas.draw()

# Hackish fix for 3D image displacement on zenhost configuration !!!
plt.savefig('/tmp/tmp.png')
#import getpass
#this_user = getpass.getuser()
#plt.savefig('/tmp/{}_tmp.png'.format(this_user))

#Determine correct location to put the plot in relation to existing figure axes
box = [max(display.axes['x'].ax.get_position().x0,display.axes['y'].ax.get_position().x0,display.axes['z'].ax.get_position().x0),min(display.axes['x'].ax.get_position().y0,display.axes['y'].ax.get_position().y0,display.axes['z'].ax.get_position().y0),display.axes['x'].ax.get_position().bounds[2],display.axes['z'].ax.get_position().bounds[3]]
Expand Down

0 comments on commit 4e8097b

Please sign in to comment.