Changeset 824465b in sasmodels


Ignore:
Timestamp:
Mar 18, 2016 12:45:09 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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
Message:

increase resolution on 2D plots in docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/genmodel.py

    r044a9c1 r824465b  
    2929    'q_max'     : 1.0, 
    3030    'nq'        : 1000, 
    31     'nq2d'      : 100, 
     31    'nq2d'      : 1000, 
    3232    'vmin'      : 1e-3,  # floor for the 2D data results 
    3333    'qx_max'    : 0.5, 
     34    #'colormap'  : 'gist_ncar', 
     35    'colormap'  : 'jet', 
    3436} 
    3537 
     
    6163        Iq2D = np.log(np.clip(Iq2D, opts['vmin'], np.inf)) 
    6264    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']) 
    6466    ax.set_xlabel(r'$Q_x \/(\AA^{-1})$') 
    6567    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_data 
    76     from matplotlib import colors 
    77     from matplotlib import rcParams 
    78     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 ice 
    84  
    8568 
    8669# Generate image  
Note: See TracChangeset for help on using the changeset viewer.