Changeset b46f285 in sasview for src/sas/qtgui/Plotter.py


Ignore:
Timestamp:
Jan 9, 2017 7:49:16 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
87cc73a
Parents:
a66ff280
Message:

Unit tests for linear fit

File:
1 edited

Legend:

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

    ra66ff280 rb46f285  
    382382        plot_dict = copy.deepcopy(self.plot_dict) 
    383383 
     384        # Labels might have been changed 
     385        xl = self.ax.xaxis.label.get_text() 
     386        yl = self.ax.yaxis.label.get_text() 
     387 
    384388        self.plot_dict = {} 
    385389 
     
    389393        for ids in plot_dict: 
    390394            if ids != id: 
    391                 self.plot(data=plot_dict[ids], hide_error=plot_dict[ids].hide_error)                 
     395                self.plot(data=plot_dict[ids], hide_error=plot_dict[ids].hide_error) 
     396 
     397        # Reset the labels 
     398        self.ax.set_xlabel(xl) 
     399        self.ax.set_ylabel(yl) 
     400        self.canvas.draw() 
    392401 
    393402    def onFreeze(self, id): 
     
    443452            self.xscale = xscale 
    444453            self.yscale = yscale 
     454 
     455            # Plot the updated chart 
     456            self.removePlot(id) 
     457 
     458            # This assignment will wrap the label in Latex "$" 
    445459            self.xLabel = new_xlabel 
    446460            self.yLabel = new_ylabel 
    447             # Plot the updated chart 
    448             self.removePlot(id) 
    449461            # Directly overwrite the data to avoid label reassignment 
    450462            self._data = current_plot 
Note: See TracChangeset for help on using the changeset viewer.