Changeset 0231f93 in sasview for src/sas/qtgui/Plotting/Plotter.py


Ignore:
Timestamp:
Aug 31, 2018 5:55:51 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
aa1db44
Parents:
eef298d4
git-author:
Piotr Rozyczko <rozyczko@…> (08/31/18 05:55:03)
git-committer:
Piotr Rozyczko <rozyczko@…> (08/31/18 05:55:51)
Message:

Improved line colour handling for 1D data charts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/Plotter.py

    r04ac604 r0231f93  
    55import functools 
    66import copy 
    7 import matplotlib.pyplot as plt 
     7import matplotlib as mpl 
    88from matplotlib.font_manager import FontProperties 
    99from sas.qtgui.Plotting.PlotterData import Data1D 
     
    126126 
    127127        color = PlotUtilities.getValidColor(color) 
     128        self.data.custom_color = color 
    128129 
    129130        markersize = self._data.markersize 
     
    162163                            picker=True) 
    163164 
     165        # Now we know what the potential new color is, let's save it 
     166        if isinstance(line, mpl.lines.Line2D): 
     167            self.data.custom_color = line.get_color() 
     168 
    164169        # Update the list of data sets (plots) in chart 
    165170        self.plot_dict[self._data.id] = self.data 
     
    433438        self.plot_dict = {} 
    434439 
    435         plt.cla() 
     440        mpl.pyplot.cla() 
    436441        self.ax.cla() 
    437442 
     
    496501 
    497502        # Clean the canvas 
    498         plt.cla() 
     503        mpl.pyplot.cla() 
    499504        self.ax.cla() 
    500505 
Note: See TracChangeset for help on using the changeset viewer.