Skip to content

Auto mark tracking issue #1252

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

Closed
3 of 13 tasks
mbostock opened this issue Feb 3, 2023 · 11 comments
Closed
3 of 13 tasks

Auto mark tracking issue #1252

mbostock opened this issue Feb 3, 2023 · 11 comments
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

mbostock commented Feb 3, 2023

Fast follows from #1238:

Bugs

Robustness — aspiring to produce good plots for any combination of options

Options — making more configuration possible

Other enhancements

Docs

@mbostock mbostock added the enhancement New feature or request label Feb 3, 2023
@mbostock mbostock mentioned this issue Feb 3, 2023
8 tasks
@tophtucker
Copy link
Contributor

Maybe lower-priority, but not to be forgotten:

  • "Shorthand" (make it work for passing arrays of primitives)
  • Better default unconfigured state for Plot.auto(aapl).plot() than an error (notes)

@tophtucker
Copy link
Contributor

It’s a little hard to say why, but this should be lines, not rects:

image

Is it because date_of_birth is continuous, albeit not monotonic, and reduce is something other than count? Implicitly stacking means feels wrong.

@tophtucker
Copy link
Contributor

An explicit size reducer should stop us from setting an implicit y reducer:

image

@mbostock
Copy link
Member Author

mbostock commented Feb 3, 2023

reduce is something other than count

Yes, we should only implicitly stack when the reduce is count, not when it’s something else. You can always add counts but adding means/medians/etc. often doesn’t make sense.

I’ve added your TODO’s to the list above, along with this one.

@Fil
Copy link
Contributor

Fil commented Feb 4, 2023

sum is also additive :-) I'm adding it to the TODO.

@tophtucker
Copy link
Contributor

Setting size to an ordinal dimension shows nothing. That makes sense, since Plot.dot(data, {x: "culmen_depth_mm", r: "sex"}).plot() shows nothing either, and I'm not sure what it'd mean… maybe size by the value's index in the domain? But it feels broken when I'm trying every combination and every other one works. Could also throw an error.

image

@mbostock
Copy link
Member Author

mbostock commented Feb 7, 2023

Setting size to an ordinal dimension shows nothing.

Related #493; the data here is being filtered because the size channel implicitly coerces to numbers producing NaN.

@tophtucker
Copy link
Contributor

Should we throw an error when a column isn't found in the data?

Two notable cases. You might've made a typo (as described in Robert's Levenshtein distance comment #493 (comment), though imo that's overkill):

Plot.auto(aapl, {x: "close"}).plot()

Or you might've changed the data source, invalidating your column selections:

Plot.auto(olympians, {x: "Close"}).plot()

Other marks don't do this, so I imagine you've considered it and decided against it, but it might fit with Plot.auto's more aggressive and opinionated mandate.

@mbostock
Copy link
Member Author

Should we throw an error when a column isn't found in the data? … Other marks don't do this

I think we plan on doing this eventually for all marks as part of #493 (though maybe as a warning rather than an error). I’d like to minimize the “unnecessary” differences between Plot.auto and concrete mark types, where it makes sense; detecting whether the column you referenced exists feels like something that could apply to all marks. I don’t see it as part of the “opinionated defaults” that is the raison d’être for Plot.auto.

@tophtucker
Copy link
Contributor

"Error: implicit ordinal position domain has more than 10,000 values" is the most common (only?) error I've been seeing, which makes me itch for limit/sort. Maybe the channel options object could have a limit property; undefined would default to ~20; if null, it wouldn't limit; if it limits, it always sorts? {x: {value: "nationality", limit: 100}}

@tophtucker tophtucker changed the title Auto mark fast follows Auto mark tracking issue Mar 29, 2023
@mbostock
Copy link
Member Author

Closing this umbrella issue. Please re-open individual feature issues as needed for better tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants