Changeset fbb9397 in sasmodels for sasmodels/data.py


Ignore:
Timestamp:
Oct 18, 2017 8:11:37 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3c24ccd
Parents:
32f87a5
Message:

fix handling of value limits on plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/data.py

    r09141ff rfbb9397  
    646646    ymin, ymax = min(data.qy_data), max(data.qy_data) 
    647647    if view == 'log': 
    648         vmin, vmax = np.log10(vmin), np.log10(vmax) 
     648        vmin_scaled, vmax_scaled= np.log10(vmin), np.log10(vmax) 
     649    else: 
     650        vmin_scaled, vmax_scaled = vmin, vmax 
    649651    plt.imshow(plottable.reshape(len(data.x_bins), len(data.y_bins)), 
    650652               interpolation='nearest', aspect=1, origin='lower', 
    651                extent=[xmin, xmax, ymin, ymax], vmin=vmin, vmax=vmax) 
     653               extent=[xmin, xmax, ymin, ymax], 
     654               vmin=vmin_scaled, vmax=vmax_scaled) 
    652655    plt.xlabel("$q_x$/A$^{-1}$") 
    653656    plt.ylabel("$q_y$/A$^{-1}$") 
Note: See TracChangeset for help on using the changeset viewer.