Changeset 824465b in sasmodels for doc/genmodel.py
- Timestamp:
- Mar 18, 2016 12:45:09 PM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 092cb3c
- Parents:
- 42f1ad9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/genmodel.py
r044a9c1 r824465b 29 29 'q_max' : 1.0, 30 30 'nq' : 1000, 31 'nq2d' : 100 ,31 'nq2d' : 1000, 32 32 'vmin' : 1e-3, # floor for the 2D data results 33 33 'qx_max' : 0.5, 34 #'colormap' : 'gist_ncar', 35 'colormap' : 'jet', 34 36 } 35 37 … … 61 63 Iq2D = np.log(np.clip(Iq2D, opts['vmin'], np.inf)) 62 64 ax.imshow(Iq2D, interpolation='nearest', aspect=1, origin='lower', 63 extent=[-qx_max, qx_max, -qx_max, qx_max], cmap= pylab.cm.jet)65 extent=[-qx_max, qx_max, -qx_max, qx_max], cmap=opts['colormap']) 64 66 ax.set_xlabel(r'$Q_x \/(\AA^{-1})$') 65 67 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 74 def ice_cm():75 from matplotlib._cm import _Blues_data76 from matplotlib import colors77 from matplotlib import rcParams78 def from_white(segments):79 scale = 1.0/segments[0][1]80 return [(k, v*scale, w*scale) for k, v, w in segments]81 ice_data = dict((k,from_white(v)) for k,v in _Blues_data.items())82 ice = colors.LinearSegmentedColormap("ice", ice_data, rcParams['image.lut'])83 return ice84 85 68 86 69 # Generate image
Note: See TracChangeset
for help on using the changeset viewer.