Changeset 821c330 in sasview for src/sas/sasgui/plottools/PlotPanel.py
- Timestamp:
- Sep 15, 2016 8:33:57 AM (8 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/PlotPanel.py
ref6d1d8 r821c330 1223 1223 if prop["ylabel"]: 1224 1224 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"])1229 1225 self.subplot.set_title(prop["title"]) 1230 1226 … … 1767 1763 _yscale = 'linear' 1768 1764 for item in list: 1769 set_ylim = False # Whether to set ylim based on data points or error bars1770 1765 item.setLabel(self.xLabel, self.yLabel) 1771 1766 # control axis labels from the panel itself … … 1827 1822 self.graph._yaxis_transformed("1/%s" % yname, "%s" % yunits) 1828 1823 if self.yLabel == "y*x^(2)": 1829 set_ylim = True1830 1824 item.transformY(transform.toYX2, transform.errToYX2) 1831 1825 xunits = convert_unit(4, self.xaxis_unit) … … 1833 1827 "%s%s" % (yunits, xunits)) 1834 1828 if self.yLabel == "y*x^(4)": 1835 set_ylim = True1836 1829 item.transformY(transform.toYX4, transform.errToYX4) 1837 1830 xunits = convert_unit(4, self.xaxis_unit) … … 1864 1857 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname), 1865 1858 "%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))1879 1859 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)1884 1860 1885 1861 # set new label and units
Note: See TracChangeset
for help on using the changeset viewer.