Ignore:
Timestamp:
Aug 11, 2016 6:22:16 AM (8 years ago)
Author:
lewis
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b2f21e0d
Parents:
09d6719
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

    r09d6719 r8abd96d  
    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.