Commit 6995fdec authored by Heller, William T.'s avatar Heller, William T.
Browse files

Replace output.py

parent 90671b92
Loading
Loading
Loading
Loading
+26 −3
Original line number Diff line number Diff line
@@ -272,9 +272,32 @@ def outputSetRes(conf, res):
            plt.close(fig)


####################################################
# determine if we use "nonposx/y" or "nonpositive" #
# this was from sanstools' set of plotting gizmos  #
####################################################
def mpl_version():
    mplversion = str(matplotlib.__version__)
    digs = mplversion.split(".")
    
    if int(digs[1])<3:
        nonposx = True
    else:
        nonposx = False
        
    return nonposx
    
    
def outputFitCurve(conf, d, m, mnum, chisq):
    nonpos = mpl_version()
    # buf = str(nonpos)
    # print(buf)
    
    fig, ax = plt.subplots()
    if nonpos is True:
        ax.set_xscale("log", nonposx='clip')
        ax.set_yscale("log", nonposy='clip')
    else:
        ax.set_xscale("log", nonpositive='clip')
        ax.set_yscale("log", nonpositive='clip')
    ax.set_autoscale_on(True)