Changeset 64f1e93 in sasview for src/sas/qtgui/UnitTesting/PlotterTest.py
- Timestamp:
- Dec 7, 2016 5:47:22 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:
- 416fa8f
- Parents:
- 55d89f8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/UnitTesting/PlotterTest.py
r6d05e1d r64f1e93 100 100 self.plotter.data = self.data 101 101 102 self.plotter.xyTransform(xLabel="ln(x)", yLabel="ln(y)") 103 self.assertEqual(self.plotter.ax.get_xlabel(), "$\\ln{()}()$") 102 self.plotter.xyTransform(xLabel="x", yLabel="y") 103 self.assertEqual(self.plotter.ax.get_xlabel(), "$()$") 104 self.assertEqual(self.plotter.ax.get_ylabel(), "$()$") 105 106 self.plotter.xyTransform(xLabel="x^(2)", yLabel="1/y") 107 self.assertEqual(self.plotter.ax.get_xlabel(), "$^{2}(()^{2})$") 108 self.assertEqual(self.plotter.ax.get_ylabel(), "$1/(()^{-1})$") 109 110 self.plotter.xyTransform(xLabel="x^(4)", yLabel="ln(y)") 111 self.assertEqual(self.plotter.ax.get_xlabel(), "$^{4}(()^{4})$") 104 112 self.assertEqual(self.plotter.ax.get_ylabel(), "$\\ln{()}()$") 105 113 106 self.plotter.xyTransform(xLabel="ln(x)", yLabel=" ln(y)")114 self.plotter.xyTransform(xLabel="ln(x)", yLabel="y^(2)") 107 115 self.assertEqual(self.plotter.ax.get_xlabel(), "$\\ln{()}()$") 108 self.assertEqual(self.plotter.ax.get_ylabel(), "$ \\ln{()}()$")116 self.assertEqual(self.plotter.ax.get_ylabel(), "$^{2}(()^{2})$") 109 117 110 self.plotter.xyTransform(xLabel="x^(2)", yLabel="1/sqrt(y)") 111 self.assertEqual(self.plotter.ax.get_xlabel(), "$^{2}(()^{2})$") 118 self.plotter.xyTransform(xLabel="log10(x)", yLabel="y*x^(2)") 119 self.assertEqual(self.plotter.ax.get_xlabel(), "$()$") 120 self.assertEqual(self.plotter.ax.get_ylabel(), "$ \\ \\ ^{2}(()^{2})$") 121 122 self.plotter.xyTransform(xLabel="log10(x^(4))", yLabel="y*x^(4)") 123 self.assertEqual(self.plotter.ax.get_xlabel(), "$^{4}(()^{4})$") 124 self.assertEqual(self.plotter.ax.get_ylabel(), "$ \\ \\ ^{4}(()^{16})$") 125 126 self.plotter.xyTransform(xLabel="x", yLabel="1/sqrt(y)") 112 127 self.assertEqual(self.plotter.ax.get_ylabel(), "$1/\\sqrt{}(()^{-0.5})$") 128 129 self.plotter.xyTransform(xLabel="x", yLabel="log10(y)") 130 self.assertEqual(self.plotter.ax.get_ylabel(), "$()$") 131 132 self.plotter.xyTransform(xLabel="x", yLabel="ln(y*x)") 133 self.assertEqual(self.plotter.ax.get_ylabel(), "$\\ln{( \\ \\ )}()$") 134 135 self.plotter.xyTransform(xLabel="x", yLabel="ln(y*x^(2))") 136 self.assertEqual(self.plotter.ax.get_ylabel(), "$\\ln ( \\ \\ ^{2})(()^{2})$") 137 138 self.plotter.xyTransform(xLabel="x", yLabel="ln(y*x^(4))") 139 self.assertEqual(self.plotter.ax.get_ylabel(), "$\\ln ( \\ \\ ^{4})(()^{4})$") 140 141 self.plotter.xyTransform(xLabel="x", yLabel="log10(y*x^(4))") 142 self.assertEqual(self.plotter.ax.get_ylabel(), "$ \\ \\ ^{4}(()^{4})$") 113 143 114 144 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.