Ignore:
Timestamp:
Sep 15, 2016 8:33:57 AM (8 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:
ab4581b
Parents:
1e5005e
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/11/16 06:22:16)
git-committer:
Piotr Rozyczko <rozyczko@…> (09/15/16 08:33:57)
Message:

Fix error bar calculations

Fixing the error bar calculations also removes the need to scale the y
axis when changing to a Porod or Kratky plot, so commit f2f6af9 has
effectively been reverted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/PlotPanel.py

    ref6d1d8 r821c330  
    12231223        if prop["ylabel"]: 
    12241224            self.subplot.set_ylabel(r"$%s$"%prop["ylabel"]) 
    1225         if prop["xlim"] is not None: 
    1226             self.subplot.set_xlim(prop["xlim"]) 
    1227         if prop["ylim"] is not None: 
    1228             self.subplot.set_ylim(prop["ylim"]) 
    12291225        self.subplot.set_title(prop["title"]) 
    12301226 
     
    17671763        _yscale = 'linear' 
    17681764        for item in list: 
    1769             set_ylim = False # Whether to set ylim based on data points or error bars 
    17701765            item.setLabel(self.xLabel, self.yLabel) 
    17711766            # control axis labels from the panel itself 
     
    18271822                self.graph._yaxis_transformed("1/%s" % yname, "%s" % yunits) 
    18281823            if self.yLabel == "y*x^(2)": 
    1829                 set_ylim = True 
    18301824                item.transformY(transform.toYX2, transform.errToYX2) 
    18311825                xunits = convert_unit(4, self.xaxis_unit) 
     
    18331827                                              "%s%s" % (yunits, xunits)) 
    18341828            if self.yLabel == "y*x^(4)": 
    1835                 set_ylim = True 
    18361829                item.transformY(transform.toYX4, transform.errToYX4) 
    18371830                xunits = convert_unit(4, self.xaxis_unit) 
     
    18641857                self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname), 
    18651858                                              "%s%s" % (yunits, xunits)) 
    1866             if self.viewModel == "Guinier lny vs x^(2)": 
    1867                 item.transformX(transform.toX2, transform.errToX2) 
    1868                 xunits = convert_unit(2, xunits) 
    1869                 self.graph._xaxis_transformed("%s^{2}" % xname, "%s" % xunits) 
    1870                 item.transformY(transform.toLogX, transform.errToLogX) 
    1871                 self.graph._yaxis_transformed("\ln\ \ %s" % yname, "%s" % yunits) 
    1872             if self.viewModel == "Porod y*x^(4) vs x^(4)": 
    1873                 item.transformX(transform.toX4, transform.errToX4) 
    1874                 xunits = convert_unit(4, self.xaxis_unit) 
    1875                 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits) 
    1876                 item.transformY(transform.toYX4, transform.errToYX4) 
    1877                 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname), 
    1878                                               "%s%s" % (yunits, xunits)) 
    18791859            item.transformView() 
    1880             if set_ylim: 
    1881                 self.graph.ylim((min(item.view.y), max(item.view.y))) 
    1882             else: 
    1883                 self.graph.ylim(None) 
    18841860 
    18851861        # set new label and units 
Note: See TracChangeset for help on using the changeset viewer.