Changeset 5770493 in sasmodels


Ignore:
Timestamp:
Apr 6, 2018 10:04:41 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:
885753a
Parents:
34f2857
Message:

sascomp: plot 2d models on separate plots when multiple parameter sets (fix)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r34f2857 r5770493  
    752752    """ 
    753753    for k in range(opts['sets']): 
    754         if k > 1: 
     754        if k > 0: 
    755755            # print a separate seed for each dataset for better reproducibility 
    756756            new_seed = np.random.randint(1000000) 
    757             print("Set %d uses -random=%i"%(k+1, new_seed)) 
     757            print("=== Set %d uses -random=%i ==="%(k+1, new_seed)) 
    758758            np.random.seed(new_seed) 
    759             if opts['plot'] and opts['is2d']: 
    760                 import matplotlib.pyplot as plt 
    761                 plt.figure() 
    762759        opts['pars'] = parse_pars(opts, maxdim=maxdim) 
    763760        if opts['pars'] is None: 
     
    765762        result = run_models(opts, verbose=True) 
    766763        if opts['plot']: 
     764            if opts['is2d'] and k > 0: 
     765                import matplotlib.pyplot as plt 
     766                plt.figure() 
    767767            limits = plot_models(opts, result, limits=limits, setnum=k) 
    768768        if opts['show_weights']: 
Note: See TracChangeset for help on using the changeset viewer.