using StatsPlots
20 StatsPlots
Basic plots using StatsPlots.jl.
20.1 Boxplot
= randn(300);
x = randn(400) .+ 1.6;
y = randn(320) .- 2.2; z
boxplot([x, y, z])
20.2 Density
density([x, y, z])
20.3 Histogram
histogram(x)
histogram([x, y, z])
20.4 Scatter
= randn(300);
x = 3 .+ x.^3 + randn(300);
y = 4 .+ x.^2 + randn(300); y2
scatter(x, y)
scatter(x, [y, y2])
20.5 Barplot
= ["alpha", "beta", "gamma"];
x = [3, 9, 5];
y = [5, 8, 7]; y2
bar(x, y)
bar(x, [y, y2])
Currently, the GR backend does not allow stacking bars. The following would produce an error: “Keyword argument bar_position not supported with Plots.GRBackend()”
# bar(x, [y, y2], bar_position=:stack)