Skip to content

Commit

Permalink
Merge branch 'main' into 2584-category-management-problems
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-wilkins authored Sep 22, 2023
2 parents 7d7d21d + f476bad commit 4ab3543
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sas/qtgui/Plotting/Plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ def plot(self, data=None, color=None, marker=None, hide_error=False, transform=T
if color is None:
color = data.custom_color

# grid on/off, stored on self
ax.grid(self.grid_on)

color = PlotUtilities.getValidColor(color)
data.custom_color = color

Expand Down Expand Up @@ -317,9 +320,11 @@ def createContextMenu(self):
self.actionAddText = self.contextMenu.addAction("Add Text")
self.actionRemoveText = self.contextMenu.addAction("Remove Text")
self.contextMenu.addSeparator()
self.actionToggleGrid = self.contextMenu.addAction("Toggle Grid On/Off")
if self.show_legend:
self.actionToggleLegend = self.contextMenu.addAction("Toggle Legend")
self.contextMenu.addSeparator()
# Additional actions
self.actionCustomizeLabel = self.contextMenu.addAction("Customize Labels")
self.contextMenu.addSeparator()
self.actionChangeScale = self.contextMenu.addAction("Change Scale")
Expand All @@ -339,6 +344,7 @@ def createContextMenu(self):
self.actionRemoveText.triggered.connect(self.onRemoveText)
self.actionChangeScale.triggered.connect(self.onScaleChange)
self.actionSetGraphRange.triggered.connect(self.onSetGraphRange)
self.actionToggleGrid.triggered.connect(self.onGridToggle)
self.actionResetGraphRange.triggered.connect(self.onResetGraphRange)
self.actionWindowTitle.triggered.connect(self.onWindowsTitle)
self.actionToggleMenu.triggered.connect(self.onToggleMenu)
Expand Down

0 comments on commit 4ab3543

Please sign in to comment.