Commit 1365104e authored by Heller, William T.'s avatar Heller, William T.
Browse files

Merge branch 'plots_with_errorbars' into 'master'

Plots with errorbars

See merge request !19
parents 5ff9c70c 0dc2ea3c
Loading
Loading
Loading
Loading
+341 KiB

File added.

No diff preview for this file type.

+1 −0
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@ git+https://github.com/SASView/sasmodels.git
numpy==1.19.0
scipy==1.5.2
PyYAML==5.3.1
matplotlib=3.2.2
+10 −9
Original line number Diff line number Diff line
@@ -272,21 +272,22 @@ def outputSetRes(conf, res):
    
    
def outputFitCurve(conf, d, m, mnum, chisq):
    fig = plt.figure()
    grph = fig.add_subplot(1,1,1)
    grph.set_autoscale_on(True)
    fig, ax = plt.subplots()
    ax.set_xscale("log", nonpositive='clip')
    ax.set_yscale("log", nonpositive='clip')
    ax.set_autoscale_on(True)
    
    # set the plot title
    val = "%6.4f" %(chisq)
    grph.set_title('Fit of profile '+str(mnum)+' to '+str(conf.datafile)+r' $\chi^2$='+val)
    ax.set_title('Fit of profile '+str(mnum)+' to '+str(conf.datafile)+r' $\chi^2$='+val)
    
    # set the text of the axes
    grph.set_xlabel('q  (1/${\AA}$)')
    grph.set_ylabel('Intensity  (1/cm)')
    ax.set_xlabel('q  (1/${\AA}$)')
    ax.set_ylabel('Intensity  (1/cm)')
    
    # plot the data and the fit curve.  No errorbars here
    grph.loglog(d.x, d.y, marker='o', mec='k', mfc='w', color='w')
    grph.loglog(m.x, m.y, 'r')
    # plot the data and the fit curve.
    ax.errorbar(d.x, d.y, yerr=d.dy, marker='o',mec='k',mfc='w',color='w',ecolor='k',elinewidth=2)
    ax.plot(m.x,m.y,color='r',linewidth=2, zorder=2.5)
    
    oname = str(conf.output)+"%02d.png" %(mnum)
    fig.savefig(oname,format='png')
+15 −15
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ def is_external_dependency(dependency):

setup(
    name='sas_temper',
	version='0.1',
    version='0.1.0',
    description='SAS data analysis using simulated annealing and reproducibility characterization.  Uses sasmodels package',
    packages=['sas_temper'],
    scripts=['scripts/sas_temper'],