diff --git a/README.md b/README.md index 03b0fd6..5b4ab0e 100644 --- a/README.md +++ b/README.md @@ -357,6 +357,17 @@ plot( ![heatmap dendrogram optimal](https://user-images.githubusercontent.com/3502975/59949464-20778680-9441-11e9-8ed7-9a639b50dfb2.png) +## Plotting statistical model objects +So far there are only recipes for the bivariate case, but the plan is to make this work for all types of statistical models + +```julia +using StatsPlots, GLM, RDatasets +iris = dataset("datasets", "iris") +mod = lm(@formula(PetalLength ~ PetalWidth), iris) +plot(mod) +@df iris scatter!(:PetalWidth, :PetalLength, ms = 2, c = :black, legend = :topleft) +``` + ## GroupedErrors.jl for population analysis Population analysis on a table-like data structures can be done using the highly recommended [GroupedErrors](https://github.com/piever/GroupedErrors.jl) package. diff --git a/model_example.png b/model_example.png new file mode 100644 index 0000000..d862380 Binary files /dev/null and b/model_example.png differ