Changeset 55d88b4 in sasmodels for sasmodels/data.py


Ignore:
Timestamp:
Oct 23, 2017 8:03:20 AM (7 years ago)
Author:
GitHub <noreply@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
c11d09f, eb3fab6, 6db17bd
Parents:
09141ff (diff), ba7302a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Andrew Jackson <andrew.jackson@…> (10/23/17 08:03:20)
git-committer:
GitHub <noreply@…> (10/23/17 08:03:20)
Message:

Merge pull request #51 from SasView?/flexible-cylinder

Flexible cylinder

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/data.py

    r09141ff rba7302a  
    434434 
    435435    scale = data.x**4 if view == 'q4' else 1.0 
     436    xscale = yscale = 'linear' if view == 'linear' else 'log' 
    436437 
    437438    if use_data or use_theory: 
     
    466467            plt.ylim(*limits) 
    467468 
    468         plt.xscale('linear' if not some_present or non_positive_x 
    469                    else view if view is not None 
    470                    else 'log') 
    471         plt.yscale('linear' 
    472                    if view == 'q4' or not some_present or not all_positive 
    473                    else view if view is not None 
    474                    else 'log') 
     469 
     470        xscale = ('linear' if not some_present or non_positive_x 
     471                  else view if view is not None 
     472                  else 'log') 
     473        yscale = ('linear' 
     474                  if view == 'q4' or not some_present or not all_positive 
     475                  else view if view is not None 
     476                  else 'log') 
     477        plt.xscale(xscale) 
    475478        plt.xlabel("$q$/A$^{-1}$") 
     479        plt.yscale(yscale) 
    476480        plt.ylabel('$I(q)$') 
    477481        title = ("data and model" if use_theory and use_data 
     
    501505        plt.xlabel("$q$/A$^{-1}$") 
    502506        plt.ylabel('residuals') 
    503         plt.xscale('linear') 
    504507        plt.title('(model - Iq)/dIq') 
     508        plt.xscale(xscale) 
     509        plt.yscale('linear') 
    505510 
    506511 
Note: See TracChangeset for help on using the changeset viewer.