-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plot Recipes #581
Comments
this sounds like a great idea! |
Alright, I've gotten started with the Plots recipes, and I'm running into some obstacles Below is the current result from the following code snippet (code here). using GLM
using StatsPlots
using RDatasets
data = dataset("datasets", "trees")
l = lm(@formula(Height ~ Girth + Volume), data)
plot(
residualplot(l),
qqplot(l),
scalelocationplot(l),
residualsleverageplot(l),
layout = (2,2),
size = (700,500)
) The issues I'm currently facing are that I'm trying to reuse the Annotations also seem finnicky, so I'll probably raise an issue in the Plots repo. Those technical details aside, how close do we want to stay to R's plots? R adds smoothed lines through the plots, which would require another dependency to implement in Julia, and it's not clear to whether that is worth it. I also haven't implemented the labelling of potential outliers, which seems more useful. Anyway, Merry Christmas. |
Looks good! |
This would be great to have. I'd have a preference for Makie based recipes, though. |
Coming right up. using GLM
using GLMakie
using RDatasets
data = dataset("datasets", "trees")
l = lm(@formula(Height ~ Girth + Volume), data)
begin
fig = Figure()
residualplot(fig[1,1], l)
qqplot(fig[1,2], l)
scalelocationplot(fig[2,1], l)
residualsleverageplot(fig[2,2], l)
fig
end Frustratingly, there is no clear way to specify axis labels and titles in Makie recipes. Right now, I'm using a hack that is quite brittle. |
It just occurred to me that one feature from R that is missing from this package is the ability to get summary plots (https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/plot.lm), and I see no issues about it here.
This is totally doable without adding new dependencies via Extensions and RecipesBase/MakieCore. I'm tempted to make a small PR during the holidays.
Those would be mostly for standard OLS linear regression. Any other plots that would be nice to have?
The text was updated successfully, but these errors were encountered: