Changes in / [886a89d:325e89a] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/genmodel.py
r044a9c1 rc094758 2 2 import numpy as np 3 3 import matplotlib.pyplot as plt 4 import pylab5 4 sys.path.insert(0, os.path.abspath('..')) 6 5 from sasmodels import generate, core … … 29 28 'q_max' : 1.0, 30 29 'nq' : 1000, 31 'nq2d' : 100,30 'nq2d' : 400, 32 31 'vmin' : 1e-3, # floor for the 2D data results 33 32 'qx_max' : 0.5, … … 60 59 if opts['zscale'] == 'log': 61 60 Iq2D = np.log(np.clip(Iq2D, opts['vmin'], np.inf)) 62 ax.imshow(Iq2D, interpolation='nearest', aspect=1, origin='lower', 63 extent=[-qx_max, qx_max, -qx_max, qx_max], cmap=pylab.cm.jet) 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) 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))73 66 74 67 def ice_cm(): … … 104 97 plot_2d(model, opts, ax2d) 105 98 ax1d = fig.add_axes([ax_left, ax_bottom, ax_width, ax_height]) 106 plot_1d(model, opts, ax1d)107 99 #ax.set_aspect('square') 108 100 else: … … 129 121 captionstr += '.. figure:: img/' + model_info['id'] + '_autogenfig.png\n' 130 122 captionstr += '\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' 123 captionstr += ' 1D plot corresponding to the default parameters of the model.\n' 135 124 captionstr += '\n' 136 125
Note: See TracChangeset
for help on using the changeset viewer.