'c30p5': 'c', 'c30p10': 'k'} symbols = {'c30p0': 's', 'c20p0': 'v', 'c40p0': '^', 'c30p5': 'p', 'c30p10': 'H'} ############################################################# # First plot: Just Shen, frac diffs ############################################################# filters = ('arealR<100',) baseline = cstSequence(shen_cold, uniformMaxRotSlice, filters).getSeqPlot([xVar], [yVar], filters) for script in colors.keys(): thisSet = cstDataset(script, "HShenEOS", ye, sourceDb) thisSeq = cstSequence(thisSet, uniformMaxRotSlice, filters) thisPlot = thisSeq.getSeqPlot([xVar], [yVar], filters) result = reduceTwoSeqPlots(baseline, thisPlot, lambda a, b: 100 * b / a) plt.loglog(*result, c=colors[script], label=script) plt.loglog([1.e14, 3.e15], [100., 100.], ls=':', linewidth=1, c='k') plt.xlabel(xLabel) plt.axes().yaxis.set_minor_formatter(matplotlib.pyplot.FormatStrFormatter('%.0f')) plt.axes().yaxis.set_major_formatter(matplotlib.pyplot.FormatStrFormatter('%.0f')) plt.ylabel("$M_g$/$M_g(\mathrm{cold}),\, \%$", labelpad=5) removeExponentialNotationOnAxis('y') plt.legend() plt.show()
c0p0.getSecInstabilitySeq(0.0, 0.7, 1e15, 3e15) exit() sliceDict = {'a': 1.0, 'rpoe': 'min'} filters = () # ('ToverW<.12', 'RedMax=0.0')#('ToverW>0.1',) thisSeq40 = cstSequence(c40p0, sliceDict, filters) thisSeq0 = cstSequence(c0p0, sliceDict, filters) #thisSeq.getColumnData(['J', 'gravMass'], lambda j, m: j / (m * m), ('ToverW<.25',)) # # guy40 = thisSeq40.getSeqPlot(['rpoe'], ['J', 'gravMass'], filters, # ycolFunc=lambda j, m: j / (m * m)) # guy0 = thisSeq0.getSeqPlot(['rpoe'], ['J', 'gravMass'], filters, # ycolFunc=lambda j, m: j / (m * m)) guy40 = thisSeq40.getSeqPlot(['edMax'], ['gravMass'], filters, ycolFunc=lambda j: j) guy0 = thisSeq0.getSeqPlot(['edMax'], ['gravMass'], filters, ycolFunc=lambda j: j) result = reduceTwoSeqPlots(guy0, guy40, lambda a, b: b / a - 1.0) print result plt.plot(*result) plt.show() #thisSeq = cstSequence(c30p0, {'rpoe': 1.0, 'edMax': 323076923000000.})