1
0
mirror of https://gitlab.com/lander-team/air-prop-simulation.git synced 2025-07-23 22:51:35 +00:00

make plot prettier

This commit is contained in:
2021-03-22 11:39:26 -07:00
parent f8cc74c614
commit f3594bf3dc
2 changed files with 15 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,9 +1,11 @@
using Unitful
using DataFrames
using Plots
theme(:ggplot2);
using UnitfulRecipes
using CSV
using Measurements
using Measurements: value, uncertainty
using Printf
@@ -61,7 +63,17 @@ println("Mass Total: ", Wtank + Wsolenoid + maximum(df.Mass))
print(describe(df))
plot(df.Time[1:350:end], df.Thrust[1:350:end], title = "Thrust Over Time")
thrust_values = df.Thrust .|> ustrip .|> value
thrust_uncertainties = df.Thrust .|> ustrip .|> uncertainty
plot(df.Time .|> ustrip, thrust_values,
title="Thrust Over Time",
ribbon=(thrust_uncertainties, thrust_uncertainties),
fillalpha=.2,label="Thrust",
xlabel="Time (s)",
ylabel="Thrust (N)",
palette=:leonardo,
)
### Save data to readme.md