Changeset 6c7ebb88 in sasview for src/sas/qtgui/Plotting


Ignore:
Timestamp:
Mar 31, 2019 8:04:26 AM (5 years ago)
Author:
GitHub <noreply@…>
Parents:
f994f188 (diff), d32a594 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Adam Washington <rprospero@…> (03/31/19 08:04:26)
git-committer:
GitHub <noreply@…> (03/31/19 08:04:26)
Message:

Merge d32a594acc82ad29555832f498167b51564c75f3 into f994f188e28dca36e7823b2deb3bf2bfc351c35c

Location:
src/sas/qtgui/Plotting
Files:
3 edited

Legend:

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

    r6edd344 r6c7ebb88  
    9191            # make sure we have some function to operate on 
    9292            if self.data.xtransform is None: 
    93                 self.data.xtransform = 'log10(x)' 
     93                if self.data.isSesans: 
     94                    self.data.xtransform='x' 
     95                else: 
     96                    self.data.xtransform = 'log10(x)' 
    9497            if self.data.ytransform is None: 
    95                 self.data.ytransform = 'log10(y)' 
     98                if self.data.isSesans: 
     99                    self.data.ytransform='y' 
     100                else: 
     101                    self.data.ytransform = 'log10(y)' 
    96102            #Added condition to Dmax explorer from P(r) perspective 
    97103            if self.data._xaxis == 'D_{max}': 
  • src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py

    r6edd344 r6c7ebb88  
    8181        """ Ensure that Sesans data is plotted in linear cooredinates""" 
    8282        data = Data1D(x=[1.0, 2.0, 3.0], 
    83                       y=[10.0, 11.0, 12.0], 
     83                      y=[-10.0, -11.0, -12.0], 
    8484                      dx=[0.1, 0.2, 0.3], 
    8585                      dy=[0.1, 0.2, 0.3]) 
     
    9797        self.assertEqual(self.plotter.ax.get_xscale(), 'linear') 
    9898        self.assertEqual(self.plotter.ax.get_yscale(), 'linear') 
     99        self.assertEqual(self.plotter.data.ytransform, "y") 
    99100        self.assertTrue(FigureCanvas.draw_idle.called) 
    100101 
  • src/sas/qtgui/Plotting/PlotterBase.py

    r8fad50b rb016f17  
    111111        self.contextMenu = QtWidgets.QMenu(self) 
    112112        self.toolbar = NavigationToolbar(self.canvas, self) 
     113        cid = self.canvas.mpl_connect('resize_event', self.onResize) 
     114 
    113115        layout.addWidget(self.toolbar) 
    114116        if not quickplot: 
     
    244246        raise NotImplementedError("Context menu method must be implemented in derived class.") 
    245247 
     248    def onResize(self, event): 
     249        """ 
     250        Redefine default resize event 
     251        """ 
     252        pass 
     253 
    246254    def contextMenuEvent(self, event): 
    247255        """ 
Note: See TracChangeset for help on using the changeset viewer.