GSASIIplot: plotting routines

class GSASIIplot.G2Plot3D(parent, id=-1, dpi=None, **kwargs)[source]

needs a doc string

class GSASIIplot.G2PlotMpl(parent, id=-1, dpi=None, **kwargs)[source]

needs a doc string

class GSASIIplot.G2PlotNoteBook(parent, id=-1)[source]

create a tabbed window for plotting


delete a tabbed page


Called when a keystroke event gets picked up by the notebook window rather the child. This is not expected, but somehow it does sometimes on the Mac and perhaps Linux.

Assume that the page associated with the currently displayed tab has a child, .canvas; give that child the focus and pass it the event.


respond to someone pressing a tab on the plot window

Rename(oldName, newName)[source]

rename a tab


Add a tabbed page with a 3D plot


Add a tabbed page with a matplotlib plot


Add a tabbed page with an openGL plot


clear all pages from plot window

class GSASIIplot.G2PlotOgl(parent, id=-1, dpi=None, **kwargs)[source]

needs a doc string

class GSASIIplot.GSASIItoolbar(plotCanvas)[source]

Override the matplotlib toolbar so we can add more icons


reposition limits to scan or zoom by button press


Respond to press of help button on plot toolbar


Provide user with list of keystrokes defined for plot as well as an alternate way to access the same functionality


Initiate the start of a Frame or Polygon map

  • G2frame (wx.Frame) – The main GSAS-II tree “window”
  • eventkey (str) – a single letter (‘f’ or ‘p’) that determines what type of mask is created.

Initiate the start of adding a new d-zero to a strain data set

  • G2frame (wx.Frame) – The main GSAS-II tree “window”
  • eventkey (str) – a single letter (‘a’) that triggers the addition of a d-zero.
GSASIIplot.Plot3DSngl(G2frame, newPlot=False, Data=None, hklRef=None, Title=False)[source]

3D Structure factor plotting package - displays reflections as rings proportional to F, F**2, etc. as requested as 3D array

GSASIIplot.PlotCalib(G2frame, Inst, XY, Sigs, newPlot=False)[source]

plot of CW or TOF peak calibration

GSASIIplot.PlotCovariance(G2frame, Data)[source]

needs a doc string

GSASIIplot.PlotDeltSig(G2frame, kind)[source]

needs a doc string

GSASIIplot.PlotExposedImage(G2frame, newPlot=False, event=None)[source]

General access module for 2D image plotting

GSASIIplot.PlotISFG(G2frame, newPlot=False, type='')[source]

Plotting package for PDF analysis; displays I(q), S(q), F(q) and G(r) as single or multiple plots with waterfall and contour plots as options

GSASIIplot.PlotImage(G2frame, newPlot=False, event=None, newImage=True)[source]

Plot of 2D detector images as contoured plot. Also plot calibration ellipses, masks, etc.

GSASIIplot.PlotIntegration(G2frame, newPlot=False, event=None)[source]

Plot of 2D image after image integration with 2-theta and azimuth as coordinates

GSASIIplot.PlotPatterns(G2frame, newPlot=False, plotType='PWDR')[source]

Powder pattern plotting package - displays single or multiple powder patterns as intensity vs 2-theta, q or TOF. Can display multiple patterns as “waterfall plots” or contour plots. Log I plotting available.


Plotting of instrument broadening terms as function of 2-theta Seen when “Instrument Parameters” chosen from powder pattern data tree


plotting of powder lines (i.e. no powder pattern) as sticks

GSASIIplot.PlotRama(G2frame, phaseName, Rama, RamaName, Names=, []PhiPsi=, []Coeff=[])[source]

needs a doc string

GSASIIplot.PlotRigidBody(G2frame, rbType, AtInfo, rbData, defaults)[source]

RB plotting package. Can show rigid body structures as balls & sticks

GSASIIplot.PlotSelectedSequence(G2frame, ColumnList, TableGet, SelectX, fitnum=None, fitvals=None)[source]

Plot a result from a sequential refinement

  • G2frame (wx.Frame) – The main GSAS-II tree “window”
  • ColumnList (list) – list of int values corresponding to columns selected as y values
  • TableGet (function) – a function that takes a column number as argument and returns the column label, the values and there ESDs (or None)
  • SelectX (function) – a function that returns a selected column number (or None) as the X-axis selection
GSASIIplot.PlotSizeStrainPO(G2frame, data, Start=False)[source]

Plot 3D mustrain/size/preferred orientation figure. In this instance data is for a phase

GSASIIplot.PlotSngl(G2frame, newPlot=False, Data=None, hklRef=None, Title='')[source]

Structure factor plotting package - displays zone of reflections as rings proportional to F, F**2, etc. as requested

GSASIIplot.PlotStrain(G2frame, data, newPlot=False)[source]

plot of strain data, used for diagnostic purposes

GSASIIplot.PlotStructure(G2frame, data, firstCall=False)[source]

Crystal structure plotting package. Can show structures as balls, sticks, lines, thermal motion ellipsoids and polyhedra

GSASIIplot.PlotTRImage(G2frame, tax, tay, taz, newPlot=False)[source]

a test plot routine - not normally used

GSASIIplot.PlotTexture(G2frame, data, Start=False)[source]

Pole figure, inverse pole figure, 3D pole distribution and 3D inverse pole distribution plotting. dict generalData contains all phase info needed which is in data

GSASIIplot.PlotTorsion(G2frame, phaseName, Torsion, TorName, Names=, []Angles=, []Coeff=[])[source]

needs a doc string

GSASIIplot.PlotXY(G2frame, XY, XY2=None, labelX=None, labelY=None, newPlot=False, Title='')[source]

simple plot of xy data, used for diagnostic purposes

Previous topic

GSASIIindex: Cell Indexing Module

Next topic

GSASII powder calculation module

This Page