Changeset 3857 for trunk/GSASIIscriptable.py
- Timestamp:
- Mar 18, 2019 12:09:57 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIscriptable.py
r3849 r3857 1068 1068 gsasii_version = str(GSASIIpath.GetVersionNumber()) 1069 1069 LoadG2fil() 1070 import matplotlib as mpl 1071 python_library_versions = G2fil.get_python_versions([mpl, np, sp]) 1070 try: 1071 import matplotlib as mpl 1072 python_library_versions = G2fil.get_python_versions([mpl, np, sp]) 1073 except ModuleNotFoundError: 1074 python_library_versions = G2fil.get_python_versions([np, sp]) 1072 1075 1073 1076 controls_data = dict(G2obj.DefaultControls) … … 2812 2815 try: 2813 2816 import matplotlib.pyplot as plt 2814 data = self.data['data'][1]2815 if Yobs:2816 plt.plot(data[0], data[1], label='Yobs')2817 if Ycalc:2818 plt.plot(data[0], data[3], label='Ycalc')2819 if Background:2820 plt.plot(data[0], data[4], label='Background')2821 if Residual:2822 plt.plot(data[0], data[5], label="Residual")2823 2817 except ImportError: 2824 pass 2818 print('Unable to import matplotlib, skipping plot') 2819 return 2820 data = self.data['data'][1] 2821 if Yobs: 2822 plt.plot(data[0], data[1], label='Yobs') 2823 if Ycalc: 2824 plt.plot(data[0], data[3], label='Ycalc') 2825 if Background: 2826 plt.plot(data[0], data[4], label='Background') 2827 if Residual: 2828 plt.plot(data[0], data[5], label="Residual") 2825 2829 2826 2830 def get_wR(self):
Note: See TracChangeset
for help on using the changeset viewer.