gplt.plot3d: grid data and isolines?
Hi I am trying to plot 3D regular grid data with gplt.plot3d(Arr) where Arr data is generated as: 1 1 x 1 2 y 2 1 x2 2 2 y2 ... etc plot3d plots the data points ok but the isolines simply join 1 2 y <---> 2 1 x2 etc. Gnuplot's way of sorting this out and quickly plotting this type of data is to leave a blank line between the major grid (defining the iso's): 1 1 x 1 2 y 2 1 x2 2 2 y2 I was wondering if there was a way of getting this behaviour using scipy.gplt? I have managed to emulate this behaviour relatively easily by altering the _format(self,x) function in pyPlot.py at line 727 Currently if __format() gets INF it prints a ' - ' it would be really useful if it printed a space ' ' instead (detail at end), then one could "insert" an empty line into the plotdata file using INF in your array. Any suggestions on how to do this otherwise are more than welcome. Thanks in advance Brett ++++++++++++++++++++++= from pyPlot.py (line 727) def _format(self,x): ############################# ## complications added to check for INF, -INF ############################# #note: does not check for IND at the moment str = '' for val in x: if(val == INF or val == NEG_INF): #str = str + ' - ' # old str = str + ' ' # possible solution else: str = '%s %g' % (str,val) return str -- Brett G. Olivier (bgoli at sun dot ac dot za) Biochemistry Dept, Stellenbosch University Tel: +27-21-8085871 Fax: +27-218085863 "Don't think; let the machine do it for you!" -- E. C. Berkeley
Ignore my potential workaround suggested in the last email. It turns out to be a *very bad idea* as it messes up the 2D plots!
Currently if __format() gets INF it prints a ' - ' it would be really useful if it printed a space ' ' instead
-- Brett G. Olivier (bgoli at sun dot ac dot za)
participants (1)
-
Brett G. Olivier