Skip to content
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

Specify the min or max of a quantitative scale without specifying the whole extent #1577

Open
Fil opened this issue May 17, 2023 · 3 comments
Labels
enhancement New feature or request question Further information is needed

Comments

@Fil
Copy link
Contributor

Fil commented May 17, 2023

Possibilities:

  • a min option and a max option.
  • support domain: [min, undefined] and domain: [undefined, max]
  • support domain as a function of the channels

min and max is more straightforward, but we'd have to decide what happens when people specify both a min and an explicit domain (a warning maybe?).

domain as a function opens lots of other possibilities (like custom “nicing”), which might be a pro or a con.

@Fil Fil added enhancement New feature or request question Further information is needed labels May 17, 2023
@Fil
Copy link
Contributor Author

Fil commented Jul 11, 2023

Another feature would be to allow the user to specify values that must be in the domain; for example when you don't know exactly what the values will be in your dataset, but you absolutely want the domain to include [0, 10] — maybe just to create a scale that doesn't show “0, 0.5, 1, 1.5, 2.0” as ticks (related: #355 #1268).

@Hvass-Labs
Copy link

This suggestion seems related to your 2nd comment. But just to be sure we mean the same thing:

It would be useful if I could specify values that must be included on each axis, but the axis-ranges won't change unless necessary. For example:

Plot.plot({ x: { include: [10, 30] },
            y: { include: [-1000, +1000] }, ... });

If the data has x-values between 5 and 40, then the x-range won't change. But if the data only has x-values between 15 and 20, then the x-axis will be expanded to the desired range between 10 and 30. Similar for the y-range.

@Fil
Copy link
Contributor Author

Fil commented Jan 23, 2024

See also #1976 (reply in thread)

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

No branches or pull requests

2 participants