Changeset 9c0f3c17 in sasview for src/sas/sasgui/plottools/plottables.py
- Timestamp:
- Apr 4, 2017 12:50:04 PM (8 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- f2940c4
- Parents:
- 463e7ffc (diff), 1779e72 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/plottables.py
r463e7ffc r9c0f3c17 43 43 # Support for ancient python versions 44 44 import copy 45 import numpy 45 import numpy as np 46 46 import sys 47 47 import logging … … 708 708 self.dy = None 709 709 if not has_err_x: 710 dx = n umpy.zeros(len(x))710 dx = np.zeros(len(x)) 711 711 if not has_err_y: 712 dy = n umpy.zeros(len(y))712 dy = np.zeros(len(y)) 713 713 for i in range(len(x)): 714 714 try: … … 798 798 tempdy = [] 799 799 if self.dx == None: 800 self.dx = n umpy.zeros(len(self.x))800 self.dx = np.zeros(len(self.x)) 801 801 if self.dy == None: 802 self.dy = n umpy.zeros(len(self.y))802 self.dy = np.zeros(len(self.y)) 803 803 if self.xLabel == "log10(x)": 804 804 for i in range(len(self.x)): … … 828 828 tempdy = [] 829 829 if self.dx == None: 830 self.dx = n umpy.zeros(len(self.x))830 self.dx = np.zeros(len(self.x)) 831 831 if self.dy == None: 832 self.dy = n umpy.zeros(len(self.y))832 self.dy = np.zeros(len(self.y)) 833 833 if self.yLabel == "log10(y)": 834 834 for i in range(len(self.x)): … … 861 861 tempdy = [] 862 862 if self.dx == None: 863 self.dx = n umpy.zeros(len(self.x))863 self.dx = np.zeros(len(self.x)) 864 864 if self.dy == None: 865 self.dy = n umpy.zeros(len(self.y))865 self.dy = np.zeros(len(self.y)) 866 866 if xmin != None and xmax != None: 867 867 for i in range(len(self.x)): … … 1230 1230 1231 1231 def sample_graph(): 1232 import numpy as n x1232 import numpy as np 1233 1233 1234 1234 # Construct a simple graph 1235 1235 if False: 1236 x = n x.array([1, 2, 3, 4, 5, 6], 'd')1237 y = n x.array([4, 5, 6, 5, 4, 5], 'd')1238 dy = n x.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3])1236 x = np.array([1, 2, 3, 4, 5, 6], 'd') 1237 y = np.array([4, 5, 6, 5, 4, 5], 'd') 1238 dy = np.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3]) 1239 1239 else: 1240 x = n x.linspace(0, 1., 10000)1241 y = n x.sin(2 * nx.pi * x * 2.8)1242 dy = n x.sqrt(100 * nx.abs(y)) / 1001240 x = np.linspace(0, 1., 10000) 1241 y = np.sin(2 * np.pi * x * 2.8) 1242 dy = np.sqrt(100 * np.abs(y)) / 100 1243 1243 data = Data1D(x, y, dy=dy) 1244 1244 data.xaxis('distance', 'm')
Note: See TracChangeset
for help on using the changeset viewer.