Plot Namespace Reference

Classes

class  Line
 
class  Plot
 

Functions

def addNavigationToolbar ()
 
def addNewAxes (rect=None, frameon=True, patchcolor='none')
 
def axes ()
 
def axesList ()
 
def closePlot ()
 
def delNavigationToolbar ()
 
def figure (winTitle="plot")
 
def getMainWindow ()
 
def getMdiArea ()
 
def getPlot ()
 
def grid (status=True)
 
def legend (status=True, pos=None, fontsize=None)
 
def plot (x, y, name=None)
 
def removeSerie (index)
 
def save (path, figsize=None, dpi=None)
 
def series ()
 
def title (string)
 
def xlabel (string)
 
def ylabel (string)
 

Variables

 msg
 

Function Documentation

◆ addNavigationToolbar()

def Plot.addNavigationToolbar ( )
Add the matplotlib QT navigation toolbar to the plot.

References getPlot().

◆ addNewAxes()

def Plot.addNewAxes (   rect = None,
  frameon = True,
  patchcolor = 'none' 
)
Add new axes to plot, setting it as the active one.

Keyword arguments:
rect -- Axes area, None to copy from the last axes data.
frameon -- True to show frame, False otherwise.
patchcolor -- Patch color, 'none' for transparent plot.

References getPlot().

Referenced by plotAxes.TaskPanel.TaskPanel.onNew(), shipCapacityCurve.PlotAux.Plot.plot(), shipHydrostatics.PlotAux.Plot.plotCoeffs(), shipHydrostatics.PlotAux.Plot.plotStability(), and shipHydrostatics.PlotAux.Plot.plotVolume().

◆ axes()

def Plot.axes ( )
Return the active plot axes.

References getPlot().

Referenced by shipAreasCurve.PlotAux.Plot.plot(), and shipGZ.PlotAux.Plot.plot().

◆ axesList()

def Plot.axesList ( )

◆ closePlot()

def Plot.closePlot ( )
closePlot(): Close the active plot window. 

References getMdiArea().

◆ delNavigationToolbar()

def Plot.delNavigationToolbar ( )
Remove the matplotlib QT navigation toolbar from the plot.

References getPlot().

◆ figure()

def Plot.figure (   winTitle = "plot")

◆ getMainWindow()

def Plot.getMainWindow ( )
Return the FreeCAD main window. 

Referenced by getMdiArea().

◆ getMdiArea()

def Plot.getMdiArea ( )
Return FreeCAD MdiArea. 

References getMainWindow().

Referenced by closePlot(), figure(), and getPlot().

◆ getPlot()

◆ grid()

def Plot.grid (   status = True)

◆ legend()

def Plot.legend (   status = True,
  pos = None,
  fontsize = None 
)
Show/Hide the legend from the active plot.

Keyword arguments:
status -- True if legend must be shown, False otherwise.
pos -- Legend position.
fontsize -- Font size

References getPlot(), and series().

Referenced by PlotGui.Legend.Activated(), plotPositions.TaskPanel.TaskPanel.onData(), shipHydrostatics.PlotAux.Plot.plotCoeffs(), shipHydrostatics.PlotAux.Plot.plotStability(), and shipHydrostatics.PlotAux.Plot.plotVolume().

◆ plot()

def Plot.plot (   x,
  y,
  name = None 
)
Plots a new serie (as line plot)

Keyword arguments:
x -- X values
y -- Y values
name -- Data serie name (for legend).

References figure(), and getPlot().

Referenced by shipAreasCurve.PlotAux.Plot.plot(), shipCapacityCurve.PlotAux.Plot.plot(), shipGZ.PlotAux.Plot.plot(), shipHydrostatics.PlotAux.Plot.plotCoeffs(), shipHydrostatics.PlotAux.Plot.plotStability(), and shipHydrostatics.PlotAux.Plot.plotVolume().

◆ removeSerie()

def Plot.removeSerie (   index)
Remove a data serie from the active plot.

Keyword arguments:
index -- Index of the serie to remove.

References getPlot().

Referenced by plotSeries.TaskPanel.TaskPanel.onRemove().

◆ save()

def Plot.save (   path,
  figsize = None,
  dpi = None 
)
Save plot.

Keyword arguments:
path -- Destination file path.
figsize -- w,h figure size tuple in inches.
dpi -- Dots per inch.

References getPlot().

Referenced by plotSave.TaskPanel.TaskPanel.accept().

◆ series()

◆ title()

def Plot.title (   string)
Setup the plot title.

Keyword arguments:
string -- Plot title.

References getPlot().

Referenced by plotLabels.TaskPanel.TaskPanel.onLabels().

◆ xlabel()

◆ ylabel()

Variable Documentation

◆ msg

Plot.msg
Initial value:
1 = PySide.QtGui.QApplication.translate(
2  "plot_console",
3  "matplotlib not found, so Plot module can not be loaded",
4  None)