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

size in graph coordinates #129

Open
markhamnr opened this issue Jun 22, 2024 · 3 comments
Open

size in graph coordinates #129

markhamnr opened this issue Jun 22, 2024 · 3 comments
Assignees

Comments

@markhamnr
Copy link

I noticed that functions like JKQTPXYParametrizedScatterGraph::setSizeColumn set the size of a symbol in points, rather than in the plot's own coordinates. Is there a way to specify the size in terms of the axis coordinates I haven't found?

Maybe this is uncommon, but to me, this would be more useful than specifying the size in "points", which is rather arbitrary in the context of a graph. For example, I might wish to plot some kind of probabilities, so that P(x, y) ∊ [0, 1] is the diameter of a square centered at x,y.

@jkriege2
Copy link
Owner

Hi!
I think when I designed that class ... i thought about which dimension would be best for size (and width) ... first I was thinking along plot coordinates,but then I decided against, because I couldn't find (m)any applications ... but that said, I think it's rather simple to add a mode where you can specify size in plot coordinates as an options (ultimately you only have to change the size-calculation ...).
But also note that this might require scaling differently in x- and y-axis! So circles could become ellipses ...

Best,
JAN

@jkriege2 jkriege2 self-assigned this Jun 24, 2024
@markhamnr
Copy link
Author

That's a good point re: scaling…I really only envisioned using this when the aspect ratio and axis aspect ratio were both 1, or at least the same as each other.

gnuplot allows something similar with the x- and y-sizes controllable independently, so I guess you could make it fully customizable if you really wanted to. But personally, I'm not sure anyone would have a use for this, so I would just pick one axis, use that for the sizing and expect the programmer to manage the aspect ratios accordingly — that is, if you even care to do this at all. :)

@jkriege2
Copy link
Owner

Not Sure Yet .. but I can propose two things for now:

  1. Use JKQTPGeoEllipse (https://jkriege2.github.io/JKQtPlotter/class_j_k_q_t_p_geo_ellipse.html) or obe of its cousins ... but you will have to assemble the plot yourself and can't use the datastore as datasource
  2. If you propose a PR, adding what you rnvision: I don't see any reason not to merge that ...

Best,
Jan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants