Salome HOME
Merge Python 3 porting.
[modules/gui.git] / tools / CurvePlot / src / python / controller / __init__.py
1 """
2 CurvePlot Python package.
3 """
4 try:
5   # Some unicode chars are improperly rendered with the default 'tkagg' backend (delta for ex)
6   # and the Bitstream font which is the first one by default. Try to use DejaVu which is more 
7   # comprehensive.
8   ## !!Order of the sequence below is highly sensitive!!
9   import pyqtside   # will trigger the PySide/PyQt4 switch
10   import matplotlib
11   matplotlib.use('Qt4Agg')
12   import matplotlib.pyplot as plt  # must come after the PySide/PyQt4 switch!
13   plt.rcParams['font.sans-serif'].insert(0, "DejaVu Sans")
14 except:
15   print("Warning: could not switch matplotlib to 'Qt4agg' backend. Some characters might be displayed improperly!")
16
17 from .PlotController import PlotController
18 from TableModel import TableModel
19 from CurveModel import CurveModel
20 from PlotManager import PlotManager
21 from XYPlotSetModel import XYPlotSetModel
22
23 ## The static API of PlotController is the main interface of the package and is hence exposed at package level:
24 AddCurve = PlotController.AddCurve
25 AddPlotSet = PlotController.AddPlotSet
26 ExtendCurve = PlotController.ExtendCurve
27 ResetCurve = PlotController.ResetCurve
28 CopyCurve = PlotController.CopyCurve
29 DeleteCurve = PlotController.DeleteCurve
30 DeletePlotSet = PlotController.DeletePlotSet
31 ClearPlotSet = PlotController.ClearPlotSet
32 SetXLabel = PlotController.SetXLabel
33 SetYLabel = PlotController.SetYLabel
34 GetPlotSetID = PlotController.GetPlotSetID
35 GetPlotSetIDByName = PlotController.GetPlotSetIDByName
36 GetAllPlotSets = PlotController.GetAllPlotSets
37 GetCurrentCurveID = PlotController.GetCurrentCurveID
38 GetCurrentPlotSetID = PlotController.GetCurrentPlotSetID
39 SetCurrentCurve = PlotController.SetCurrentCurve
40 SetCurrentPlotSet = PlotController.SetCurrentPlotSet
41 DeleteCurrentItem = PlotController.DeleteCurrentItem
42 SetCurveMarker = PlotController.SetCurveMarker
43 SetCurveLabel = PlotController.SetCurveLabel
44 SetXLog = PlotController.SetXLog
45 SetYLog = PlotController.SetYLog
46 SetXSciNotation = PlotController.SetXSciNotation
47 SetYSciNotation = PlotController.SetYSciNotation
48 RegisterCallback = PlotController.RegisterCallback
49 ClearCallbacks = PlotController.ClearCallbacks
50 GetSalomeViewID = PlotController.GetSalomeViewID
51 SetLegendVisible = PlotController.SetLegendVisible
52 SetPlotSetTitle = PlotController.SetPlotSetTitle
53
54 # For advanced usage only:
55 GetInstance = PlotController.GetInstance
56 LockRepaint = PlotController.LockRepaint
57 UnlockRepaint = PlotController.UnlockRepaint
58