Commit 1d3fb010 authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

fix stream 2dplot

parent df5a57b6
......@@ -433,7 +433,7 @@ class C2dplot:
ok,timex=uns.unsin.getData("time")
if self.__vdebug:
print ("Loading time : " , time.time()-t0)
# read data_rectify
if self.__rect_sim is not None:
print("Rectify is activated....\n",file=sys.stderr)
......@@ -497,9 +497,10 @@ class C2dplot:
else:
fig=self.__figure
gs = self.__gs
#print(gs.get_width_ratios(),gs.get_height_ratios(),gs.get_grid_positions(fig))
fig.suptitle(os.path.basename(uns.unsin.getFileName())+" - time : %.03f"%(timex))
t1=time.time()
for r in range(nrows):
for c in range(ncols):
ax = plt.subplot(gs[r, c])
......@@ -517,13 +518,20 @@ class C2dplot:
ok_center, center_xy,center_xz,ax,fig,r,contour=contour,nc=nc,
center_cod=center_cod,nopart=nopart)
fig.subplots_adjust(hspace=0.,wspace=0.)
if self.__vdebug:
print("Overall time [%.3f] sec"%(time.time()-t0),file=sys.stderr)
#if self.__vdebug:
print("Overall time [%.3f] sec"%(time.time()-t0),file=sys.stderr)
print("Display time [%.3f] sec"%(time.time()-t1),file=sys.stderr)
t3=time.time()
if (out==''):
#plt.ion()
if not nbd:
plt.draw()
plt.pause(0.0000001)
#plt.draw()
plt.ioff()
#plt.pause(0.0000001)
plt.pause(0.000000000001)
plt.clf()
plt.cla()
#plt.close()
else:
plt.show()
else:
......@@ -536,8 +544,10 @@ class C2dplot:
if not os.path.isfile(outfile):
print("\nUnable to save figure [%s], aborting...\n"%(outfile),file=sys.stderr)
sys.exit()
#plt.close(fig)
# if self.__vdebug:
print(">>>>>Plot time [%.3f] sec"%(time.time()-t3),file=sys.stderr)
#
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment