docs(example): Adds Confidence Interval Ellipses#3747
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
https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker https://github.com/vega/altair/actions/runs/12612565960/job/35149436953?pr=3747
|
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)) |
|
Thanks for your help with this @mattijn |
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.altairgalleryparsing (CI Run)numpyandscipypandas(see thread)examples_methods_syntaxversionalt.(X|Y)changed to chain.scale(zero=False)plotnine.stat_ellipseFuture 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
scipydependency, 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: