##// END OF EJS Templates
Se agrega el folder "graphics" que contiene figure.py y mpldriver.py...
Se agrega el folder "graphics" que contiene figure.py y mpldriver.py figure.py contiene las clases: Figure, Axes mpldriver.py driver para matplotlib En el modelo se creado: jroplot.py, aqui se ha agregado la clase Scope, para hacer graficos tipo osciloscopio. El archivo de prueba: test4NewSignalChain.py contiene un ejemplo.

File last commit:

r190:cfcc2c9608cc
r190:cfcc2c9608cc
Show More
figure.py
61 lines | 1.6 KiB | text/x-python | PythonLexer
import mpldriver
class Figure:
axesList = None
def __init__(self):
pass
def init(self, idfigure, wintitle, width, height, nplots):
self.idfigure = idfigure
self.wintitle = wintitle
self.width = width
self.height = height
self.nplots = nplots
mpldriver.init(idfigure, wintitle, width, height)
self.axesList = []
def setTitle(self, title):
mpldriver.setTitle(self.idfigure, title)
def setTextFromAxes(self, title):
mpldriver.setTextFromAxes(self.idfigure, self.axesList[0].ax, title)
def makeAxes(self, nrow, ncol, xpos, ypos, colspan, rowspan):
ax = mpldriver.makeAxes(self.idfigure, nrow, ncol, xpos, ypos, colspan, rowspan)
axesObj = Axes(ax)
self.axesList.append(axesObj)
def draw(self):
mpldriver.draw(self.idfigure)
def run(self):
pass
class Axes:
firsttime = None
ax = None
def __init__(self, ax):
self.firsttime = True
self.ax = ax
def pline(self, x, y, xmin, xmax, ymin, ymax, xlabel, ylabel, title):
mpldriver.pline(ax=self.ax,
x=x,
y=y,
xmin=xmin,
xmax=xmax,
ymin=ymin,
ymax=ymax,
xlabel=xlabel,
ylabel=ylabel,
title=title,
firsttime=self.firsttime)
self.firsttime = False
def pcolor(self):
pass