improve plots in chapter 7
This commit is contained in:
6
ch07.jl
6
ch07.jl
@@ -204,14 +204,14 @@ dates[dayname.(dates) .== "Thursday" .&& ismissing.(rates)]
|
|||||||
# Codes for plotting exchange rate data
|
# Codes for plotting exchange rate data
|
||||||
|
|
||||||
using Plots
|
using Plots
|
||||||
plot(dates, rates; xlabel="day", ylabel="PLN/USD", legend=false)
|
plot(dates, rates; xlabel="day", ylabel="PLN/USD", legend=false, marker=:o)
|
||||||
|
|
||||||
rates_ok = .!ismissing.(rates)
|
rates_ok = .!ismissing.(rates)
|
||||||
|
|
||||||
plot(dates[rates_ok], rates[rates_ok];
|
plot(dates[rates_ok], rates[rates_ok];
|
||||||
xlabel="day", ylabel="PLN/USD", legend=false)
|
xlabel="day", ylabel="PLN/USD", legend=false, marker=:o)
|
||||||
|
|
||||||
using Impute
|
using Impute
|
||||||
rates_filled = Impute.interp(rates)
|
rates_filled = Impute.interp(rates)
|
||||||
|
|
||||||
scatter!(dates, rates_filled)
|
scatter!(dates, rates_filled, markersize=3)
|
||||||
|
|||||||
Reference in New Issue
Block a user