Textboxes SUCK

This commit is contained in:
Cal W
2023-04-02 21:49:52 +10:00
parent d9c4836038
commit dab5a12ad7

View File

@@ -56,7 +56,7 @@ if __name__ == "__main__":
"xLabel": "Time (ms)", "xLabel": "Time (ms)",
"yLabel": "Strain (ε)" if ii % 2 == 0 else "", "yLabel": "Strain (ε)" if ii % 2 == 0 else "",
"plots": [ "plots": [
{"type": "text", "text": "Δt = 10ms", "x":0.99, "y":0.03, "align":("bottom", "right")}, #{"type": "text", "text": "Δt = 10ms", "x":0.99, "y":0.03, "align":("bottom", "right")},
{"type":"scatter", "x": data1["Time"], "y": data1["Strain"], "args":{"s":10, "zorder":2}, "label":"Upper", "colour": UQC["purple"]}, {"type":"scatter", "x": data1["Time"], "y": data1["Strain"], "args":{"s":10, "zorder":2}, "label":"Upper", "colour": UQC["purple"]},
{"type":"scatter", "x": data2["Time"], "y": data2["Strain"], "args":{"s":10, "zorder":1}, "label":"Lower", "colour": UQC["dark_grey"]}, {"type":"scatter", "x": data2["Time"], "y": data2["Strain"], "args":{"s":10, "zorder":1}, "label":"Lower", "colour": UQC["dark_grey"]},
{"type":"plot", "x": data1["Time"], "y": data1["Strain"], "args":{"zorder":0, "alpha":0.25}, "colour": UQC["purple"]}, {"type":"plot", "x": data1["Time"], "y": data1["Strain"], "args":{"zorder":0, "alpha":0.25}, "colour": UQC["purple"]},
@@ -65,7 +65,11 @@ if __name__ == "__main__":
} }
graphData["subPlots"].append(newPlot) graphData["subPlots"].append(newPlot)
fig, ax = makeGraph(graphData, showPlot=False) fig, _ = makeGraph(graphData, showPlot=False)
#fig.figlegend([ax[0], ax[0]], ['Upper','Lower'], loc=(0.85, 0.65))
# Subplots adjusted to make room
# Note bbox_extra_artists includes both the title and the legend so that neither are cut off
#fig.subplots_adjust(top=0.8, right=0.8)
fig.savefig(f"./images/actualData_Runs_{i+1}-_{i+4}.png") fig.savefig(f"./images/actualData_Runs_{i+1}-_{i+4}.png")
# Initial test Data # Initial test Data