Changeset 3477478 in sasview for src/sas/plottools/PlotPanel.py
- Timestamp:
- Mar 5, 2015 12:38:29 PM (10 years ago)
- 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:
- b9dbd6b
- Parents:
- 2df0b74
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/plottools/PlotPanel.py
r121f72c r3477478 40 40 for a in obj.get_children(): show_tree(a, d + 1) 41 41 42 from unitConverter import UnitConvertion as convertUnit42 from convert_units import convert_unit 43 43 44 44 … … 1790 1790 if self.xLabel == "x^(2)": 1791 1791 item.transformX(transform.toX2, transform.errToX2) 1792 xunits = convert Unit(2, xunits)1792 xunits = convert_unit(2, xunits) 1793 1793 self.graph._xaxis_transformed("%s^{2}" % xname, "%s" % xunits) 1794 1794 if self.xLabel == "x^(4)": 1795 1795 item.transformX(transform.toX4, transform.errToX4) 1796 xunits = convert Unit(4, xunits)1796 xunits = convert_unit(4, xunits) 1797 1797 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits) 1798 1798 if self.xLabel == "ln(x)": … … 1805 1805 if self.xLabel == "log10(x^(4))": 1806 1806 item.transformX(transform.toX4, transform.errToX4) 1807 xunits = convert Unit(4, xunits)1807 xunits = convert_unit(4, xunits) 1808 1808 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits) 1809 1809 _xscale = 'log' … … 1820 1820 if self.yLabel == "y^(2)": 1821 1821 item.transformY(transform.toX2, transform.errToX2) 1822 yunits = convert Unit(2, yunits)1822 yunits = convert_unit(2, yunits) 1823 1823 self.graph._yaxis_transformed("%s^{2}" % yname, "%s" % yunits) 1824 1824 if self.yLabel == "1/y": 1825 1825 item.transformY(transform.toOneOverX, transform.errOneOverX) 1826 yunits = convert Unit(-1, yunits)1826 yunits = convert_unit(-1, yunits) 1827 1827 self.graph._yaxis_transformed("1/%s" % yname, "%s" % yunits) 1828 1828 if self.yLabel == "y*x^(4)": 1829 1829 item.transformY(transform.toYX4, transform.errToYX4) 1830 xunits = convert Unit(4, self.xaxis_unit)1830 xunits = convert_unit(4, self.xaxis_unit) 1831 1831 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname), 1832 1832 "%s%s" % (yunits, xunits)) … … 1834 1834 item.transformY(transform.toOneOverSqrtX, 1835 1835 transform.errOneOverSqrtX) 1836 yunits = convert Unit(-0.5, yunits)1836 yunits = convert_unit(-0.5, yunits) 1837 1837 self.graph._yaxis_transformed("1/\sqrt{%s}" % yname, 1838 1838 "%s" % yunits) … … 1843 1843 if self.yLabel == "ln(y*x^(2))": 1844 1844 item.transformY(transform.toLogYX2, transform.errToLogYX2) 1845 xunits = convert Unit(2, self.xaxis_unit)1845 xunits = convert_unit(2, self.xaxis_unit) 1846 1846 self.graph._yaxis_transformed("\ln (%s \ \ %s^{2})" % (yname, xname), 1847 1847 "%s%s" % (yunits, xunits)) 1848 1848 if self.yLabel == "ln(y*x^(4))": 1849 1849 item.transformY(transform.toLogYX4, transform.errToLogYX4) 1850 xunits = convert Unit(4, self.xaxis_unit)1850 xunits = convert_unit(4, self.xaxis_unit) 1851 1851 self.graph._yaxis_transformed("\ln (%s \ \ %s^{4})" % (yname, xname), 1852 1852 "%s%s" % (yunits, xunits)) 1853 1853 if self.yLabel == "log10(y*x^(4))": 1854 1854 item.transformY(transform.toYX4, transform.errToYX4) 1855 xunits = convert Unit(4, self.xaxis_unit)1855 xunits = convert_unit(4, self.xaxis_unit) 1856 1856 _yscale = 'log' 1857 1857 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname), … … 1859 1859 if self.viewModel == "Guinier lny vs x^(2)": 1860 1860 item.transformX(transform.toX2, transform.errToX2) 1861 xunits = convert Unit(2, xunits)1861 xunits = convert_unit(2, xunits) 1862 1862 self.graph._xaxis_transformed("%s^{2}" % xname, "%s" % xunits) 1863 1863 item.transformY(transform.toLogX, transform.errToLogX) … … 1865 1865 if self.viewModel == "Porod y*x^(4) vs x^(4)": 1866 1866 item.transformX(transform.toX4, transform.errToX4) 1867 xunits = convert Unit(4, self.xaxis_unit)1867 xunits = convert_unit(4, self.xaxis_unit) 1868 1868 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits) 1869 1869 item.transformY(transform.toYX4, transform.errToYX4)
Note: See TracChangeset
for help on using the changeset viewer.