##// END OF EJS Templates
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING

File last commit:

r141:1997872d9e6c
r141:1997872d9e6c
Show More
schainPlotTypes.py
529 lines | 15.8 KiB | text/x-python | PythonLexer
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 import numpy
Daniel Valdez
r138 import datetime
import time
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133 from schainPlot import *
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141
class SpcFigure(Figure):
overplot = 0
xw = 800
yw = 650
showprofile = False
def __init__(self, idfigure, nframes, wintitle, driver, colormap, colorbar, showprofile):
Figure.__init__(self,idfigure, nframes, wintitle, self.xw, self.yw, self.overplot, driver, colormap, colorbar)
self.showprofile = showprofile
def getSubplots(self):
ncolumns = int(numpy.sqrt(self.nframes)+0.9)
nrows = int(self.nframes*1./ncolumns + 0.9)
return nrows, ncolumns
def setParms(self, data, x, y, xmin, xmax, ymin, ymax, minvalue, maxvalue, *args):
if xmin == None: xmin = numpy.min(x)
if xmax == None: xmax = numpy.max(x)
if ymin == None: ymin = numpy.min(y)
if ymax == None: ymax = numpy.max(y)
if minvalue == None: minvalue = 20.
if maxvalue == None: maxvalue = 90.
self.xmin = xmin
self.xmax = xmax
self.minrange = ymin
self.maxrange = ymax
self.ymin = ymin
self.ymax = ymax
self.minvalue = minvalue
self.maxvalue = maxvalue
def changeXRange(self, *args):
pass
def createFrames(self):
for frame in range(self.nframes):
frameObj = SpcFrame(self.drvObj,frame + 1, self.colorbar, self.showprofile)
self.frameObjList.append(frameObj)
class SpcFrame(Frame):
def __init__(self,drvObj,idframe,colorbar,showprofile):
self.drvObj = drvObj
self.idframe = idframe
self.nplots = 1
if showprofile:
self.nplots += 1
self.colorbar = colorbar
self.showprofile = showprofile
self.createPlots()
def createPlots(self):
plotObjList = []
idplot = 0
xi, yi, xw, yw = self.getScreenPos(idplot)
plotObj = SpcPlot(self.drvObj, self.idframe, idplot, xi, yi, xw, yw, self.colorbar)
plotObjList.append(plotObj)
if self.showprofile:
idplot = 1
xi, yi, xw, yw = self.getScreenPos(idplot)
type = "pwbox"
title = ""
xlabel = "dB"
ylabel = ""
plotObj = Plot1D(self.drvObj, self.idframe, idplot, xi, yi, xw, yw, type, title, xlabel, ylabel)
plotObjList.append(plotObj)
self.plotObjList = plotObjList
def getScreenPosMainPlot(self):
xi = 0.15
if self.showprofile:
xw = 0.65
else:
xw = 0.75
if self.colorbar:
xw = xw - 0.06
yi = 0.20; yw = 0.75
return xi, yi, xw, yw
def getScreenPosGraph1(self):
if self.colorbar:
xi = 0.65 + 0.08
else:
xi = 0.75 + 0.05
xw = xi + 0.2
yi = 0.2; yw = 0.75
return xi, yi, xw, yw
def plot(self,x, y, data):
plotObj = self.plotObjList[0]
plotObj.plot(x,y,data)
if self.showprofile:
plotObj = self.plotObjList[1]
plotObj.plot(data,y)
class SpcPlot(Plot):
getGrid = True
def __init__(self, drvObj, idframe, idplot, xi, yi, xw, yw, colorbar):
self.drvObj = drvObj
self.idframe = idframe
self.idplot = idplot
self.xi = xi
self.yi = yi
self.xw = xw
self.yw = yw
self.colorbar = colorbar
if self.colorbar:
cbxi = xw + 0.03
cbxw = cbxi + 0.03
cbyi = yi
cbyw = yw
self.cbxpos = [cbxi,cbxw]
self.cbypos = [cbyi,cbyw]
self.xpos = [self.xi,self.xw]
self.ypos = [self.yi,self.yw]
self.xaxisastime = False
self.timefmt = None
self.xopt = "bcnst"
self.yopt = "bcnstv"
self.szchar = 0.8
self.strforchannel = "Channel %d"%self.idframe
self.xlabel = "m/s"
self.ylabel = "Range (Km)"
def setBox(self, xmin, xmax, ymin, ymax, minvalue, maxvalue, *args):
self.xmin = xmin
self.xmax = xmax
self.ymin = ymin
self.ymax = ymax
self.minvalue = minvalue
self.maxvalue = maxvalue
self.colorbar = args[2]
self.title = "%s - %s"%(self.strforchannel,args[3])
def plot(self, x, y, data):
z = data
deltax = None
deltay = None
self.plotPcolor(x, y, z, deltax, deltay, self.getGrid)
self.getGrid = False
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
r138
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 class RTIFigure(Figure):
Daniel Valdez
r138 overplot = 1
xw = 700
yw = 650
showprofile = False
starttime = None
endtime = None
minrange = None
maxrange = None
minvalue = None
maxvalue = None
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 xrangestepinsecs = None
Daniel Valdez
r138
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 def __init__(self, idfigure, nframes, wintitle, driver, colormap="br_green", colorbar= True, showprofile=False):
Figure.__init__(self,idfigure, nframes, wintitle, self.xw, self.yw, self.overplot, driver, colormap, colorbar)
Daniel Valdez
r138 self.showprofile = showprofile
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141
Daniel Valdez
r138 def getSubplots(self):
nrows = self.nframes
ncolumns = 1
return nrows, ncolumns
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 def setParms(self, data, x, y, xmin, xmax, ymin, ymax, minvalue, maxvalue, xrangestep):
Daniel Valdez
r138
self.starttime = xmin
self.endtime = xmax
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 cdatetime = datetime.datetime.utcfromtimestamp(x)
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139
mindatetime = datetime.datetime(cdatetime.year,cdatetime.month,cdatetime.day,self.starttime.hour,self.starttime.minute,self.starttime.second)
if ((xrangestep == 0) or (xrangestep == None)):
maxdatetime = datetime.datetime(cdatetime.year,cdatetime.month,cdatetime.day,self.endtime.hour,self.endtime.minute,self.endtime.second)
self.xrangestepinsecs = time.mktime(maxdatetime.timetuple()) - time.mktime(mindatetime.timetuple())
npoints = 1000.
if xrangestep == 1:
maxdatetime = mindatetime + datetime.timedelta(hours=1)
self.xrangestepinsecs = 60*60.
npoints = 500.
if xrangestep == 2:
maxdatetime = mindatetime + datetime.timedelta(minutes=1)
self.xrangestepinsecs = 60.
npoints = 250.
if xrangestep == 3:
maxdatetime = mindatetime + datetime.timedelta(seconds=1)
self.xrangestepinsecs = 1.
npoints = 125.
xmin = time.mktime(mindatetime.timetuple())
xmax = time.mktime(maxdatetime.timetuple())
deltax = (xmax-xmin) / npoints
Daniel Valdez
r138
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 if ymin == None: ymin = numpy.min(y)
if ymax == None: ymax = numpy.max(y)
Daniel Valdez
r138
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 if minvalue == None: minvalue = 0.
if maxvalue == None: maxvalue = 50.
Daniel Valdez
r138
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 self.xmin = xmin
self.xmax = xmax
self.minrange = ymin
self.maxrange = ymax
self.ymin = ymin
self.ymax = ymax
Daniel Valdez
r138 self.minvalue = minvalue
self.maxvalue = maxvalue
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 self.xrangestep = xrangestep
self.deltax = deltax
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 def changeXRange(self,x):
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 cdatetime = datetime.datetime.utcfromtimestamp(x)
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139
if ((cdatetime.time()>=self.starttime) and (cdatetime.time()<self.endtime)):
if self.xrangestep == 1:
mindatetime = datetime.datetime(cdatetime.year,cdatetime.month,cdatetime.day,cdatetime.hour,self.starttime.minute,self.starttime.second)
if self.xrangestep == 2:
mindatetime = datetime.datetime(cdatetime.year,cdatetime.month,cdatetime.day,cdatetime.hour,cdatetime.minute,self.starttime.second)
if self.xrangestep == 3:
mindatetime = datetime.datetime(cdatetime.year,cdatetime.month,cdatetime.day,cdatetime.hour,cdatetime.minute,cdatetime.second)
Daniel Valdez
r138
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 self.xmin = time.mktime(mindatetime.timetuple()) - time.timezone
self.xmax = self.xmin + self.xrangestepinsecs
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 self.figuretitle = "%s %s : %s"%(self.figuretitle,
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 datetime.datetime.utcfromtimestamp(self.xmin).strftime("%d-%b-%Y %H:%M:%S"),
datetime.datetime.utcfromtimestamp(self.xmax).strftime("%d-%b-%Y %H:%M:%S"))
return 1
return 0
Daniel Valdez
r138
def createFrames(self):
for frame in range(self.nframes):
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 frameObj = RTIFrame(self.drvObj,frame + 1, self.colorbar, self.showprofile)
Daniel Valdez
r138 self.frameObjList.append(frameObj)
class RTIFrame(Frame):
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 def __init__(self,drvObj,idframe,colorbar,showprofile):
Daniel Valdez
r138 self.drvObj = drvObj
self.idframe = idframe
self.nplots = 1
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 if showprofile:
Daniel Valdez
r138 self.nplots += 1
self.colorbar = colorbar
self.showprofile = showprofile
self.createPlots()
def createPlots(self):
plotObjList = []
idplot = 0
xi, yi, xw, yw = self.getScreenPos(idplot)
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 plotObj = RTIPlot(self.drvObj, self.idframe, idplot, xi, yi, xw, yw, self.colorbar)
Daniel Valdez
r138 plotObjList.append(plotObj)
if self.showprofile:
idplot = 1
xi, yi, xw, yw = self.getScreenPos(idplot)
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 type = "pwbox"
title = ""
xlabel = "dB"
ylabel = ""
plotObj = Plot1D(self.drvObj, self.idframe, idplot, xi, yi, xw, yw, type, title, xlabel, ylabel)
Daniel Valdez
r138 plotObjList.append(plotObj)
self.plotObjList = plotObjList
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 def getScreenPosMainPlot(self):
Daniel Valdez
r138 xi = 0.07
if self.showprofile:
xw = 0.65
else:
xw = 0.9
if self.colorbar:
xw = xw - 0.06
yi = 0.20; yw = 0.75
return xi, yi, xw, yw
def getScreenPosGraph1(self):
if self.colorbar:
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 xi = 0.65 + 0.08
Daniel Valdez
r138 else:
xi = 0.9 + 0.05
xw = xi + 0.2
yi = 0.2; yw = 0.75
return xi, yi, xw, yw
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 def plot(self, currenttime, range, data):
plotObj = self.plotObjList[0]
plotObj.plot(currenttime,range,data)
if self.showprofile:
plotObj = self.plotObjList[1]
plotObj.plot(data,range)
Daniel Valdez
r138
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 class RTIPlot(Plot):
deltax = None
deltay = None
xrange = [None,None]
xminpos = None
xmaxpos = None
xg = None
yg = None
def __init__(self,drvObj, idframe, idplot, xi, yi, xw, yw, colorbar):
Daniel Valdez
r138 self.drvObj = drvObj
self.idframe = idframe
self.idplot = idplot
self.xi = xi
self.yi = yi
self.xw = xw
self.yw = yw
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 self.colorbar = colorbar
Daniel Valdez
r138
if self.colorbar:
cbxi = xw + 0.03
cbxw = cbxi + 0.03
cbyi = yi
cbyw = yw
self.cbxpos = [cbxi,cbxw]
self.cbypos = [cbyi,cbyw]
self.xpos = [self.xi,self.xw]
self.ypos = [self.yi,self.yw]
self.xaxisastime = True
self.timefmt = "%H:%M"
self.xopt = "bcnstd"
self.yopt = "bcnstv"
self.szchar = 1.0
self.title = "Channel %d"%self.idframe
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 self.xlabel = "Local Time"
self.ylabel = "Range (Km)"
Daniel Valdez
r138
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 def setBox(self, xmin, xmax, ymin, ymax, minvalue, maxvalue, deltax=None, deltay=None, colorbar=True, *args):
Daniel Valdez
r138 self.xmin = xmin
self.xmax = xmax
self.ymin = ymin
self.ymax = ymax
self.minvalue = minvalue
self.maxvalue = maxvalue
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139 self.deltax = deltax
self.deltay = deltay
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 self.colorbar = colorbar
Daniel Valdez
Avance de libreria para ploteo de graficos RTI
r139
def plot(self, currenttime, range, data):
if self.xmaxpos == None:
self.xmaxpos = currenttime
if currenttime >= self.xmaxpos:
self.xminpos = currenttime
self.xmaxpos = currenttime + self.deltax
x = [currenttime]
y = range
z = numpy.reshape(data, (1,-1))
getGrid = True
self.plotPcolor(x, y, z, self.deltax, self.deltay, getGrid)
Daniel Valdez
r138
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133 class ScopeFigure(Figure):
overplot = 0
xw = 700
Daniel Valdez
Avance de graficos: Scope
r135 yw = 650
colorbar = None
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
r134 def __init__(self,idfigure,nframes,wintitle,driver):
colormap = None
Daniel Valdez
Avance de graficos: Scope
r135 colorbar = False
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
Avance de graficos: Scope
r135 self.idfigure = idfigure
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133 self.nframes = nframes
Daniel Valdez
Avance de graficos: Scope
r135 self.wintitle = wintitle
Daniel Valdez
r138
Daniel Valdez
Avance de graficos: Scope
r135 self.colormap = colormap
Daniel Valdez
r138 self.colorbar = colorbar
self.driver = driver
self.drvObj = Driver(self.driver, self.idfigure, self.xw, self.yw, self.wintitle, self.overplot, self.colormap, self.colorbar)
Daniel Valdez
Avance de graficos: Scope
r135 self.drvObj.driver.setFigure()
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
Avance de graficos: Scope
r135 # Figure.__init__(self,idfigure,nframes,wintitle,self.xw,self.yw,self.overplot,driver,colorbar,colormap,*args)
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
def getSubplots(self):
nrows = self.nframes
ncolumns = 1
return nrows, ncolumns
Daniel Valdez
Avance de graficos: Scope
r135
def createFrames(self):
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133 for frame in range(self.nframes):
Daniel Valdez
Avance de graficos: Scope
r135 frameObj = ScopeFrame(self.drvObj,frame + 1)
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133 self.frameObjList.append(frameObj)
Daniel Valdez
Avance de graficos: Scope
r135
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
Avance de graficos: Scope
r135 class ScopeFrame(Frame):
# plotObjList = []
xlabel = ""
ylabel = ""
title = ""
def __init__(self,drvObj,idframe):
self.drvObj = drvObj
self.idframe = idframe
self.nplots = 1 #nplots/frame
self.createPlots()
# Frame.__init__(self, drvObj, idframe)
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
Avance de graficos: Scope
r135 def getScreenPosMainPlot(self):#cada Frame determina las coordenadas de los plots
xi = 0.07; xw = 0.9
yi = 0.20; yw = 0.75
return xi,yi,xw,yw
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
Avance de graficos: Scope
r135 def createPlots(self):
plotObjList = []
for idplot in range(self.nplots):
xi, yi, xw, yw = self.getScreenPos(idplot)
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 type = "scopebox"
title = "Channel %d"%self.idframe
xlabel = "range (Km)"
ylabel = "intensity"
plotObj = Plot1D(self.drvObj, self.idframe, idplot, xi, yi, xw, yw, type, title, xlabel, ylabel)
Daniel Valdez
Avance de graficos: Scope
r135 plotObjList.append(plotObj)
self.plotObjList = plotObjList
# self.plotObjList.append(plotObj)
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
Avance de graficos: Scope
r135 def plot(self, x, y, z=None):
for plotObj in self.plotObjList:
plotObj.plot(x, y)
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
Avance de graficos: Scope
r135 class Plot1D(Plot):
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 # type, title, xlabel, ylabel
def __init__(self, drvObj, idframe, idplot, xi, yi, xw, yw, type, title, xlabel, ylabel):
Daniel Valdez
Avance de graficos: Scope
r135 self.drvObj = drvObj
self.idframe = idframe
self.idplot = idplot
self.xi = xi
self.yi = yi
self.xw = xw
self.yw = yw
self.xpos = [self.xi,self.xw]
self.ypos = [self.yi,self.yw]
self.xaxisastime = False
self.timefmt = None
self.xopt = "bcnst"
self.yopt = "bcnstv"
self.szchar = 1.0
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141 self.type = type
self.title = title
self.xlabel = xlabel
self.ylabel = ylabel
Daniel Valdez
Paquete de graficos para signal chain, este paqquete contiene un nuevo diseno de objetos: Figure, Frame y Plot. Se considera tambien el uso de driver para plplot y matplotlib
r133
Daniel Valdez
Nueva version para graficos Scope, RTI, Spectra. Se hicieron pruebas con los experimentos EwDRIFTS, MST, IMAGING
r141
def setBox(self, xmin, xmax, ymin, ymax, minvalue, maxvalue, *args):
if self.type == "pwbox":
self.xmin = minvalue
self.xmax = maxvalue
self.ymin = ymin
self.ymax = ymax
self.minvalue = minvalue
self.maxvalue = maxvalue
else:
self.xmin = xmin
self.xmax = xmax
self.ymin = ymin
self.ymax = ymax
self.minvalue = minvalue
self.maxvalue = maxvalue
self.colorbar = False
Daniel Valdez
r134
Daniel Valdez
Avance de graficos: Scope
r135 def plot(self,x,y):
if y.dtype == "complex128":
color="blue"
self.plotBasicLine(x, y.real, color)
color="red"
self.plotBasicLine(x, y.imag, color)
else:
color="blue"
self.plotBasicLine(x, y, color)