Changes in / [325e89a:886a89d] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/genmodel.py
rc094758 r044a9c1 2 2 import numpy as np 3 3 import matplotlib.pyplot as plt 4 import pylab 4 5 sys.path.insert(0, os.path.abspath('..')) 5 6 from sasmodels import generate, core … … 28 29 'q_max' : 1.0, 29 30 'nq' : 1000, 30 'nq2d' : 400,31 'nq2d' : 100, 31 32 'vmin' : 1e-3, # floor for the 2D data results 32 33 'qx_max' : 0.5, … … 59 60 if opts['zscale'] == 'log': 60 61 Iq2D = np.log(np.clip(Iq2D, opts['vmin'], np.inf)) 61 h = ax.imshow(Iq2D, interpolation='nearest', aspect=1, origin='upper', 62 extent=[-qx_max, qx_max, -qx_max, qx_max], cmap=ice_cm()) 63 # , vmin=vmin, vmax=vmax) 62 ax.imshow(Iq2D, interpolation='nearest', aspect=1, origin='lower', 63 extent=[-qx_max, qx_max, -qx_max, qx_max], cmap=pylab.cm.jet) 64 64 ax.set_xlabel(r'$Q_x \/(\AA^{-1})$') 65 65 ax.set_ylabel(r'$Q_y \/(\AA^{-1})$') 66 67 # im = self.subplot.imshow(output, interpolation='nearest', 68 # origin='lower', 69 # vmin=zmin_temp, vmax=self.zmax_2D, 70 # cmap=self.cmap, 71 # extent=(self.xmin_2D, self.xmax_2D, 72 # self.ymin_2D, self.ymax_2D)) 66 73 67 74 def ice_cm(): … … 97 104 plot_2d(model, opts, ax2d) 98 105 ax1d = fig.add_axes([ax_left, ax_bottom, ax_width, ax_height]) 106 plot_1d(model, opts, ax1d) 99 107 #ax.set_aspect('square') 100 108 else: … … 121 129 captionstr += '.. figure:: img/' + model_info['id'] + '_autogenfig.png\n' 122 130 captionstr += '\n' 123 captionstr += ' 1D plot corresponding to the default parameters of the model.\n' 131 if model_info['has_2d']: 132 captionstr += ' 1D and 2D plots corresponding to the default parameters of the model.\n' 133 else: 134 captionstr += ' 1D plot corresponding to the default parameters of the model.\n' 124 135 captionstr += '\n' 125 136
Note: See TracChangeset
for help on using the changeset viewer.