Skip to content

Commit

Permalink
replace usage of setColorDialog by setColormapDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
payno committed Nov 16, 2023
1 parent 903c633 commit 1a58423
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/silx/gui/data/DataViews.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ def createWidget(self, parent):
from silx.gui import plot
widget = plot.Plot2D(parent=parent)
widget.setDefaultColormap(self.defaultColormap())
widget.getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getColormapAction().setColormapDialog(self.defaultColorDialog())
widget.getIntensityHistogramAction().setVisible(True)
widget.setKeepDataAspectRatio(True)
widget.getXAxis().setLabel('X')
Expand Down Expand Up @@ -1148,7 +1148,7 @@ def createWidget(self, parent):
widget.setColormap(self.defaultColormap(), mode=ComplexImageView.ComplexMode.SQUARE_AMPLITUDE)
widget.setColormap(self.defaultColormap(), mode=ComplexImageView.ComplexMode.REAL)
widget.setColormap(self.defaultColormap(), mode=ComplexImageView.ComplexMode.IMAGINARY)
widget.getPlot().getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getPlot().getColormapAction().setColormapDialog(self.defaultColorDialog())
widget.getPlot().getIntensityHistogramAction().setVisible(True)
widget.getPlot().setKeepDataAspectRatio(True)
widget.getXAxis().setLabel('X')
Expand Down Expand Up @@ -1248,7 +1248,7 @@ def createWidget(self, parent):
from silx.gui import plot
widget = plot.StackView(parent=parent)
widget.setColormap(self.defaultColormap())
widget.getPlotWidget().getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getPlotWidget().getColormapAction().setColormapDialog(self.defaultColorDialog())
widget.setKeepDataAspectRatio(True)
widget.setLabels(self.axesNames(None, None))
# hide default option panel
Expand Down Expand Up @@ -1720,7 +1720,7 @@ def createWidget(self, parent):
from silx.gui.data.NXdataWidgets import ArrayImagePlot
widget = ArrayImagePlot(parent)
widget.getPlot().setDefaultColormap(self.defaultColormap())
widget.getPlot().getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getPlot().getColormapAction().setColormapDialog(self.defaultColorDialog())
return widget

def axesNames(self, data, info):
Expand Down Expand Up @@ -1775,7 +1775,7 @@ def __init__(self, parent):
def createWidget(self, parent):
from silx.gui.data.NXdataWidgets import ArrayComplexImagePlot
widget = ArrayComplexImagePlot(parent, colormap=self.defaultColormap())
widget.getPlot().getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getPlot().getColormapAction().setColormapDialog(self.defaultColorDialog())
return widget

def clear(self):
Expand Down Expand Up @@ -1827,7 +1827,7 @@ def createWidget(self, parent):
from silx.gui.data.NXdataWidgets import ArrayStackPlot
widget = ArrayStackPlot(parent)
widget.getStackView().setColormap(self.defaultColormap())
widget.getStackView().getPlotWidget().getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getStackView().getPlotWidget().getColormapAction().setColormapDialog(self.defaultColorDialog())
return widget

def axesNames(self, data, info):
Expand Down Expand Up @@ -1932,7 +1932,7 @@ def createWidget(self, parent):
from silx.gui.data.NXdataWidgets import ArrayStackPlot
widget = ArrayStackPlot(parent)
widget.getStackView().setColormap(self.defaultColormap())
widget.getStackView().getPlotWidget().getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getStackView().getPlotWidget().getColormapAction().setColormapDialog(self.defaultColorDialog())
return widget

def axesNames(self, data, info):
Expand Down Expand Up @@ -1983,7 +1983,7 @@ def __init__(self, parent):
def createWidget(self, parent):
from silx.gui.data.NXdataWidgets import ArrayComplexImagePlot
widget = ArrayComplexImagePlot(parent, colormap=self.defaultColormap())
widget.getPlot().getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getPlot().getColormapAction().setColormapDialog(self.defaultColorDialog())
return widget

def axesNames(self, data, info):
Expand Down

0 comments on commit 1a58423

Please sign in to comment.