plotting Package

ColormapDialog Module

class PyMca5.PyMcaGui.plotting.ColormapDialog.ColormapDialog(parent=None, name='Colormap Dialog')[source]

Bases: PySide.QtGui.QDialog

autoscale90Change(val)[source]
autoscaleChange(val)[source]
buttonGroupChange(val)[source]
chval(ddict)[source]
colormapChange(colormap)[source]
getColormap()[source]
maxTextChanged()[source]
minTextChanged()[source]
plotHistogram(data=None)[source]
sendColormap()[source]
setAutoscale(val)[source]
setAutoscale90(val)[source]
setColormap(colormap)[source]
setColormapType(val, update=False)[source]
setDataMinMax(minVal, maxVal, update=True)[source]
setDisplayedMaxValue(val)[source]
setDisplayedMinValue(val)[source]
setMaxValue(val)[source]
setMinValue(val)[source]
sigColormapChanged = <PySide.QtCore.Signal object>
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.ColormapDialog.MyQLineEdit(parent=None, name='')[source]

Bases: PySide.QtGui.QLineEdit

focusInEvent(event)[source]
focusOutEvent(event)[source]
setPaletteBackgroundColor(color)[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>
PyMca5.PyMcaGui.plotting.ColormapDialog.test()[source]

LegendSelector Module

class PyMca5.PyMcaGui.plotting.LegendSelector.BaseContextMenu(model)[source]

Bases: PySide.QtGui.QMenu

currentIdx()[source]
exec_(pos, idx)[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.LegendSelector.LegendIcon(parent=None)[source]

Bases: PySide.QtGui.QWidget

paint(painter, rect, palette)
paintEvent(event)
Parameters:event (QPaintEvent) – event
setLineColor(color)
setLineStyle(style)
Parameters:style (int) – Must be in Qt.PenStyle
Possible joices are:
Qt.NoPen Qt.SolidLine Qt.DashLine Qt.DotLine Qt.DashDotLine Qt.DashDotDotLine Qt.CustomDashLine
setLineWidth(width)
setSymbol(symbol)
setSymbolColor(color)
Parameters:color – determines the symbol color
setSymbolStyle(style)
Parameters:style (int) – Must be in Qt.BrushStyle
Possible joices are:
Qt.NoBrush Qt.SolidPattern Qt.Dense1Pattern Qt.Dense2Pattern Qt.Dense3Pattern Qt.Dense4Pattern Qt.Dense5Pattern Qt.Dense6Pattern Qt.Dense7Pattern Qt.HorPattern Qt.VerPattern Qt.CrossPattern Qt.BDiagPattern Qt.FDiagPattern Qt.DiagCrossPattern Qt.LinearGradientPattern Qt.ConicalGradientPattern Qt.RadialGradientPattern
sizeHint()
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.LegendSelector.LegendListContextMenu(model)[source]

Bases: PyMca5.PyMcaGui.plotting.LegendSelector.BaseContextMenu

mapToLeftAction()[source]
mapToRightAction()[source]
removeItemAction()[source]
setActiveAction()[source]
sigContextMenu = <PySide.QtCore.Signal object>
staticMetaObject = <PySide.QtCore.QMetaObject object>
toggleLinesAction()[source]
togglePointsAction()[source]
class PyMca5.PyMcaGui.plotting.LegendSelector.LegendListItemWidget(parent=None, itemType=0)[source]

Bases: PySide.QtGui.QAbstractItemDelegate

createEditor(parent, option, idx)
curveType = 0
editorEvent(event, model, option, modelIndex)
imageType = 1
paint(painter, option, modelIndex)
Parameters:
  • painter (QPainter) –
  • option (QStyleOptionViewItem) –
  • modelIndex (QModelIndex) –

Here be docs..

sizeHint(option, idx)
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.LegendSelector.LegendListView(parent=None, model=None, contextMenu=None)[source]

Bases: PySide.QtGui.QListView

clear()
mousePressEvent(event)
mouseReleaseEvent(event)
setContextMenu(contextMenu=None)
setLegendList(legendList, row=None)
sigLegendSignal = <PySide.QtCore.Signal object>
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.LegendSelector.LegendModel(legendList=None, parent=None)[source]

Bases: PySide.QtCore.QAbstractListModel

activeRole = 39
data(modelIndex, role)[source]
flags(index)[source]
iconColorRole = 32
iconLineWidthRole = 33
iconSymbolRole = 35
insertLegendList(row, llist)[source]
Parameters:
  • row (int) – Determines after which row the items are inserted
  • llist – Carries the new legend information
insertRows(row, count, modelIndex=<PySide.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0) ) >)[source]
legendTypeRole = 37
removeRow(row)[source]
removeRows(row, count, modelIndex=<PySide.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0) ) >)[source]
rowCount(modelIndex=None)[source]
selectedRole = 38
setData(modelIndex, value, role)[source]
setEditor(event, editor)[source]
Parameters:
  • event (str) – String that identifies the editor
  • editor (QWidget) – Widget used to change data in the underlying model
showLineRole = 34
showSymbolRole = 36
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.LegendSelector.Notifier[source]

Bases: PySide.QtCore.QObject

signalReceived(**kw)[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>
PyMca5.PyMcaGui.plotting.LegendSelector.QVariant(x=None)[source]
PyMca5.PyMcaGui.plotting.LegendSelector.convertToPyObject(x)[source]

MaskImageWidget Module

McaROIWidget Module

class PyMca5.PyMcaGui.plotting.McaROIWidget.McaROITable(*args, **kw)[source]

Bases: PySide.QtGui.QTableWidget

addROI(roi, key=None)[source]
build()[source]
emitSignal(ddict)[source]
fillFromROIDict(roilist=[], roidict={}, currentroi=None)[source]
getROIListAndDict()[source]
mySlot(*var, **kw)[source]
nameSlot(row, col)[source]
sigMcaROITableSignal = <PySide.QtCore.Signal object>
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.McaROIWidget.McaROIWidget(parent=None, name=None)[source]

Bases: PySide.QtGui.QWidget

emitSignal(ddict)[source]
load(filename)[source]
save(filename)[source]
setData(*var, **kw)[source]
setHeader(*var, **kw)[source]
sigMcaROIWidgetSignal = <PySide.QtCore.Signal object>
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.McaROIWidget.SimpleComboBox(parent=None, name=None, fl=0, options=['1', '2', '3'])[source]

Bases: PySide.QtGui.QComboBox

getCurrent()[source]
setOptions(options=['1', '2', '3'])[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>

ObjectPrintConfigurationDialog Module

class PyMca5.PyMcaGui.plotting.ObjectPrintConfigurationDialog.ObjectPrintConfigurationDialog(parent=None, configuration=None)[source]

Bases: PySide.QtGui.QDialog

getPrintConfiguration()[source]
setPrintConfiguration(configuration, printer=None)[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.ObjectPrintConfigurationDialog.ObjectPrintConfigurationWidget(parent=None)[source]

Bases: PySide.QtGui.QWidget

getParameters()[source]
setParameters(ddict=None)[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>

PlotWidget Module

class PyMca5.PyMcaGui.plotting.PlotWidget.PlotWidget(parent=None, backend=None, legends=False, callback=None, **kw)[source]

Bases: PySide.QtGui.QMainWindow, PyMca5.PyMcaGraph.Plot.Plot

getSvgRenderer(printer=None)[source]
graphCallback(ddict=None)[source]
printGraph(width=None, height=None, xOffset=0.0, yOffset=0.0, units='inches', dpi=None, printer=None, dialog=True, keepAspectRatio=True, **kw)[source]
replot()[source]
resizeEvent(event)[source]
saveGraph(fileName, fileFormat=None, dpi=None, **kw)[source]
showLegends(flag=True)[source]
sigPlotSignal = <PySide.QtCore.Signal object>
staticMetaObject = <PySide.QtCore.QMetaObject object>

PlotWindow Module

This window handles plugins and adds a toolbar to the PlotWidget.

Currently the only dependency on PyMca is through the Icons.

class PyMca5.PyMcaGui.plotting.PlotWindow.PlotWindow(parent=None, backend=None, plugins=True, newplot=False, control=False, position=False, **kw)[source]

Bases: PyMca5.PyMcaGui.plotting.PlotWidget.PlotWidget

DEFAULT_COLORMAP_INDEX = 2
DEFAULT_COLORMAP_LOG_FLAG = False
calculateROIs(*var, **kw)[source]
changeGridLevel()[source]
emitCurrentROISignal()[source]
getPrintConfiguration(dialog=False)[source]
graphCallback(ddict)[source]
keepDataAspectRatio(flag=True)[source]
printGraph(*var, **kw)[source]
setActiveCurve(legend, replot=True)[source]
setControlMenu(menu=None)[source]
setMiddleROIMarkerFlag(flag=True)[source]
setMouseText(text='')[source]
setPrintConfiguration(configuration, printer=None)[source]
setPrintMenu(menu)[source]
setToolBarActionVisible(action, visible=True)[source]
setWindowType(wtype=None)[source]
setXAxisLogarithmic(flag=True)[source]
setYAxisLogarithmic(flag=True)[source]
showLegends(flag=True)[source]
showRoiWidget(position=None)[source]
sigROISignal = <PySide.QtCore.Signal object>
staticMetaObject = <PySide.QtCore.QMetaObject object>
toggleLegendWidget()[source]
updateActiveImageColormap(colormap, replot=True)[source]
updateLegends()[source]

ProfileScanWidget Module

PyMcaPrintPreview Module

class PyMca5.PyMcaGui.plotting.PyMcaPrintPreview.PyMcaPrintPreview(parent=None, printer=None, name='PyMcaPrintPreview', modal=0, fl=0)[source]

Bases: PyMca5.PyMcaGui.plotting.Q4PyMcaPrintPreview.PyMcaPrintPreview

staticMetaObject = <PySide.QtCore.QMetaObject object>
PyMca5.PyMcaGui.plotting.PyMcaPrintPreview.testPreview()[source]

PyMca_Icons Module

PyMca5.PyMcaGui.plotting.PyMca_Icons.showIcons()[source]
PyMca5.PyMcaGui.plotting.PyMca_Icons.ymintozero = ['16 16 3 1', ' c None', 'X c blue', '. c red', ' ', ' ', ' ', ' ', ' XX ', ' XXX XX ', ' XXX XX XX ', ' XX XXX ', ' XX ', ' XX ', ' X............. ', ' ', ' ', ' ', ' ', ' ']

average16=[ “16 16 2 1”, ”. c blue”, ” c None”, ” ”, ” .............. ”, ” ”, ” .. .. ”, ” .. .. ”, ” .. .. ”, ” .. .. ”, ” .. .. ”, ” ... ”, ” .. ”, ” .. ”, ” .. ”, ” .. ”, ” .. ”, ” .. ”, ” ” ]

Q4PyMcaPrintPreview Module

class PyMca5.PyMcaGui.plotting.Q4PyMcaPrintPreview.GraphicsResizeRectItem(parent=None, scene=None, keepratio=True)[source]

Bases: PySide.QtGui.QGraphicsRectItem

hoverEnterEvent(event)[source]
hoverLeaveEvent(event)[source]
mouseDoubleClickEvent(event)[source]
mouseMoveEvent(event)[source]
mousePressEvent(event)[source]
mouseReleaseEvent(event)[source]
class PyMca5.PyMcaGui.plotting.Q4PyMcaPrintPreview.GraphicsSvgItem[source]

Bases: PySide.QtSvg.QGraphicsSvgItem

boundingRect()[source]
paint(painter, *var, **kw)[source]
setBoundingRect(rect)[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.Q4PyMcaPrintPreview.GraphicsSvgRectItem[source]

Bases: PySide.QtGui.QGraphicsRectItem

paint(painter, *var, **kw)[source]
setSvgRenderer(renderer)[source]
class PyMca5.PyMcaGui.plotting.Q4PyMcaPrintPreview.PyMcaPrintPreview(parent=None, printer=None, name='PyMcaPrintPreview', modal=0, fl=0)[source]

Bases: PySide.QtGui.QDialog

addImage(image, title=None, comment=None, commentPosition=None)[source]

add an image item to the print preview scene

addPixmap(pixmap, title=None, comment=None, commentPosition=None)[source]

add a pixmap to the print preview scene

addSvgItem(item, title=None, comment=None, commentPosition=None)[source]
exec_()[source]
isReady()[source]
printer = None
if printer is None:

printer = qt.QPrinter(qt.QPrinter.HighResolution) printer.setPageSize(qt.QPrinter.A4) printerName = “%s” % printer.printerName() if printerName in [‘id24b2u’]:

#id24 printer very slow in color mode printer.setColorMode(qt.QPrinter.GrayScale)

printer.setFullPage(True) if (printer.width() <= 0) or (printer.height() <= 0):

if QTVERSION < ‘4.2.0’: #this is impossible (no QGraphicsView)
filename = “PyMCA_print.pdf”
else:
filename = “PyMCA_print.ps”
if sys.platform == ‘win32’:

home = os.getenv(‘USERPROFILE’) try:

l = len(home) directory = os.path.join(home,”My Documents”)
except:
home = ‘’ directory = ‘’
if os.path.isdir(‘%s’ % directory):
directory = os.path.join(directory,”PyMca”)
else:
directory = os.path.join(home,”PyMca”)
if not os.path.exists(‘%s’ % directory):
os.mkdir(‘%s’ % directory)

finalfile = os.path.join(directory, filename)

else:

home = os.getenv(‘HOME’) directory = os.path.join(home,”PyMca”) if not os.path.exists(‘%s’ % directory):

os.mkdir(‘%s’ % directory)

finalfile = os.path.join(directory, filename)

printer.setOutputFileName(finalfile) printer.setColorMode(qt.QPrinter.Color)

raise_()[source]
setOutputFileName(name)[source]
setup()[source]
show()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>
updatePrinter()[source]
PyMca5.PyMcaGui.plotting.Q4PyMcaPrintPreview.testPreview()[source]
PyMca5.PyMcaGui.plotting.Q4PyMcaPrintPreview.testSimple()[source]

RGBCorrelatorGraph Module

class PyMca5.PyMcaGui.plotting.RGBCorrelatorGraph.MyQLabel(parent=None, name=None, fl=0, bold=True, color=PySide.QtCore.Qt.GlobalColor.red)[source]

Bases: PySide.QtGui.QLabel

staticMetaObject = <PySide.QtCore.QMetaObject object>
class PyMca5.PyMcaGui.plotting.RGBCorrelatorGraph.RGBCorrelatorGraph(parent=None, selection=False, aspect=True, colormap=False, imageicons=False, standalonesave=True, standalonezoom=True, profileselection=False, polygon=False)[source]

Bases: PySide.QtGui.QWidget

focusOutEvent(ev)[source]
getPickerSelectionMode()[source]
getXLabel()[source]
getYLabel()[source]
hideImageIcons()[source]
hideInfo()[source]
hideProfileSelectionIcons()[source]
infoText()[source]
keepDataAspectRatio(flag=True)[source]
printGraph()[source]
saveGraphImage(filename, original=False)[source]
saveGraphWidget(filename)[source]
selectColormap()[source]
setInfoText(text)[source]
setMouseText(text='')[source]
setPickerSelectionWith(intValue)[source]
setSaveDirectory(wdir)[source]
setXLabel(label='Column')[source]
setYLabel(label='Row')[source]
showImageIcons()[source]
showInfo()[source]
showProfileSelectionIcons()[source]
sigProfileSignal = <PySide.QtCore.Signal object>
sizeHint()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>
PyMca5.PyMcaGui.plotting.RGBCorrelatorGraph.test()[source]

RenameCurveDialog Module

class PyMca5.PyMcaGui.plotting.RenameCurveDialog.RenameCurveDialog(parent=None, current='', curves=[])[source]

Bases: PySide.QtGui.QDialog

getText()[source]
preAccept()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object>