plotter_8.py 708 B

1234567891011121314151617181920212223
  1. def plotFigure3D(workspace):
  2. """GUI layout for plot figure
  3. Arguments:
  4. workspace {QtWidgets.QWidget} -- main layout
  5. Returns:
  6. layout {QtWidgets.QVBoxLayout} -- contains matplot figure
  7. """
  8. workspace.figure3D = Figure()
  9. workspace.canvas3D = FigureCanvas(workspace.figure3D)
  10. # workspace.figure3D.patch.set_facecolor('white')
  11. class NavigationCustomToolbar(NavigationToolbar):
  12. toolitems = [t for t in NavigationToolbar.toolitems if t[0] in ()]
  13. workspace.toolbar3D = NavigationCustomToolbar(workspace.canvas3D, workspace)
  14. layout = QVBoxLayout()
  15. layout.addWidget(workspace.canvas3D)
  16. layout.addWidget(workspace.toolbar3D)
  17. return layout