Changeset ced5bd2 in sasmodels for sasmodels/data.py


Ignore:
Timestamp:
Oct 4, 2017 4:26:41 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
2573fa1
Parents:
18a2bfc
Message:

allow -q=min:max on the sascomp command line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/data.py

    r630156b rced5bd2  
    438438 
    439439    scale = data.x**4 if view == 'q4' else 1.0 
     440    xscale = yscale = 'linear' if view == 'linear' else 'log' 
    440441 
    441442    if use_data or use_theory: 
     
    470471            plt.ylim(*limits) 
    471472 
    472         plt.xscale('linear' if not some_present or non_positive_x 
    473                    else view if view is not None 
    474                    else 'log') 
    475         plt.yscale('linear' 
    476                    if view == 'q4' or not some_present or not all_positive 
    477                    else view if view is not None 
    478                    else 'log') 
     473 
     474        xscale = ('linear' if not some_present or non_positive_x 
     475                  else view if view is not None 
     476                  else 'log') 
     477        yscale = ('linear' 
     478                  if view == 'q4' or not some_present or not all_positive 
     479                  else view if view is not None 
     480                  else 'log') 
     481        plt.xscale(xscale) 
    479482        plt.xlabel("$q$/A$^{-1}$") 
     483        plt.yscale(yscale) 
    480484        plt.ylabel('$I(q)$') 
    481485        title = ("data and model" if use_theory and use_data 
     
    505509        plt.xlabel("$q$/A$^{-1}$") 
    506510        plt.ylabel('residuals') 
    507         plt.xscale('linear') 
    508511        plt.title('(model - Iq)/dIq') 
     512        plt.xscale(xscale) 
     513        plt.yscale('linear') 
    509514 
    510515 
Note: See TracChangeset for help on using the changeset viewer.