Changeset facf4ca in sasview for src/sas/qtgui


Ignore:
Timestamp:
Sep 3, 2018 3:32:31 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:
f4a6f2c
Parents:
c1cfa80
Message:

Fixed erroneous error bars. SASVIEW-994

Location:
src/sas/qtgui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/DataExplorer.py

    r9463ca2 rfacf4ca  
    544544                # 'sophisticated' test to generate standalone plot for residuals 
    545545                if 'esiduals' in plot.title: 
    546                     self.plotData([(item, plot)], transform=False) 
     546                    plot.yscale='linear' 
     547                    self.plotData([(item, plot)]) 
    547548                else: 
    548549                    new_plots.append((item, plot)) 
  • src/sas/qtgui/Plotting/PlotProperties.py

    r53c771e rfacf4ca  
    2424        self._color = color if color else 0 
    2525        self._legend = legend 
    26         self._markersize = marker_size if marker_size else 5 
     26        self._markersize = marker_size if marker_size else 3 
    2727        self.custom_color = False if isinstance(self._color, int) else True 
    2828 
  • src/sas/qtgui/Plotting/Plottables.py

    rcee5c78 rfacf4ca  
    438438    interactive = True 
    439439    custom_color = None 
    440     markersize = 5  # default marker size is 'size 5' 
     440    markersize = 3  # default marker size is 'size 3' 
    441441 
    442442    def __init__(self): 
     
    10461046        self.symbol = 0 
    10471047        self.custom_color = None 
    1048         self.markersize = 5 
     1048        self.markersize = 3 
    10491049        self.id = None 
    10501050        self.zorder = 1 
  • src/sas/qtgui/Plotting/Plotter.py

    r0231f93 rfacf4ca  
    66import copy 
    77import matplotlib as mpl 
     8import numpy as np 
    89from matplotlib.font_manager import FontProperties 
    910from sas.qtgui.Plotting.PlotterData import Data1D 
     
    130131        markersize = self._data.markersize 
    131132 
     133        # Include scaling (log vs. linear) 
     134        ax.set_xscale(self.xscale, nonposy='clip') 
     135        ax.set_yscale(self.yscale, nonposy='clip') 
     136 
     137        # define the ranges 
     138        self.setRange = SetGraphRange(parent=self, 
     139            x_range=self.ax.get_xlim(), y_range=self.ax.get_ylim()) 
     140 
    132141        # Draw non-standard markers 
    133142        l_width = markersize * 0.4 
     
    151160                        linestyle='', label=self._title, picker=True) 
    152161            else: 
     162                dy = self._data.view.dy 
     163                # Convert tuple (lo,hi) to array [(x-lo),(hi-x)] 
     164                if dy is not None and type(dy) == type(()): 
     165                    dy = np.vstack((y - dy[0], dy[1] - y)).transpose() 
     166 
    153167                line = ax.errorbar(x, y, 
    154                             yerr=self._data.view.dy, xerr=None, 
     168                            yerr=dy, 
     169                            xerr=None, 
    155170                            capsize=2, linestyle='', 
    156171                            barsabove=False, 
     
    161176                            xlolims=False, xuplims=False, 
    162177                            label=self._title, 
     178                            zorder=1, 
    163179                            picker=True) 
    164180 
     
    183199            ax.set_xlabel(self.x_label) 
    184200 
    185         # Include scaling (log vs. linear) 
    186         ax.set_xscale(self.xscale) 
    187         ax.set_yscale(self.yscale) 
    188  
    189201        # define the ranges 
    190         self.setRange = SetGraphRange(parent=self, 
    191             x_range=self.ax.get_xlim(), y_range=self.ax.get_ylim()) 
     202        #self.setRange = SetGraphRange(parent=self, 
     203        #    x_range=self.ax.get_xlim(), y_range=self.ax.get_ylim()) 
    192204 
    193205        # refresh canvas 
Note: See TracChangeset for help on using the changeset viewer.