-
Notifications
You must be signed in to change notification settings - Fork 794
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
docs(example): Adds Confidence Interval Ellipses #3747
base: main
Are you sure you want to change the base?
Conversation
example showing bivariate deviation ellipses of petal length and width of three iris species
Happy with the end result, but not comfortable merging so much complexity I don't understand yet #3715
`scipy` is only used for one example in the user guide, but this will be the second https://docs.scipy.org/doc/scipy/release/1.15.0-notes.html#other-changes
Cannot express how relieved I am to see the CI finally green 😅 |
Observed no visible reduction in quality. Slightly visible at `<=40`
Previously returned `segments+1` rows, but this isn't specified in `ggplot2 https://github.com/tidyverse/ggplot2/blob/efc53cc000e7d86e3db22e1f43089d366fe24f2e/R/stat-ellipse.R#L122
I forgot that the only requirement was that the import is the **first statement**. Partially reverts (7cd2a77)
Also resolves #3747 (comment)
Includes comment removal suggestion in (#3747 (comment))
- Fixed a type ignore (causes by incomplete stubs) - Renamed variables - Make replace the implicit `"index"` column with naming it `"order"` #3747 (comment)
Thanks for this example! Can we add this to the category case studies instead of distributions? If the uncertainty was computed within Altair (not yet possible) than it was a good example for the distribution section. On-the-fly computation of these confidence regions by doing selections would be really great though. Continue dreaming for vega/vega-lite#6043. Can we remove this line regarding the import annotation from Can we rename the functions? Eg can we use I also tried to reduce the usage of pandas by using dicts directly. I think that can work, but the readability is slightly less than current situation. But doing more with dicts as containers is always good 😊 |
No problem @mattijn, although I feel my role in this was mostly making the connection between #3715, #514 and
Huh, I guess I'd never considered where the computation occured being a factor in the category.
Yeah I think we might not need that line at all actually. I'll take a look today and see what works 👍
Yeah those seem like much better names!
Interesting, I hadn't thought to try this without a dataframe at all 🤔 |
@mattijn hopefully I've addressed all of your points in (#3747 (commits)) |
Will close #3715
Description
Adds an example inspired by (
ggplot2
|plotnine
).stat_ellipse()
.As can be seen in the first commit, this PR began by rebasing a closed PR from almost 7 years ago.
Relevant info from (#3715 (comment)):
Example
Tasks
sphinxext.altairgallery
parsing (CI Run)numpy
andscipy
pandas
(see thread)examples_methods_syntax
versionalt.(X|Y)
changed to chain.scale(zero=False)
plotnine.stat_ellipse
Future Work
I think a more generalized version of this would be a good fit for https://github.com/vega/altair_ally.
An issue might be the
scipy
dependency, which I really was hoping to be able to avoid here.The dendrogram example shows some kind of inlining from
scipy
- but I have no idea if that is possible for: