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

add the auto_rescale_y on the GraphVisual model and make the depth of grid on GridVisual not relative to pixel width #235

Merged
merged 10 commits into from
Oct 5, 2024

Conversation

fabien-colonnier
Copy link
Contributor

@fabien-colonnier fabien-colonnier commented Oct 3, 2024

Add the option to have rescale y in the append and in the update function of the GraphVisual.
It has been tested when both x and y are updated simultaneously. In update, it is not supporting 2 y axis yet. Not test was made to check it

Copy link
Contributor

@optseb optseb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a fix required for the graph example, either to reset it back to x^3 or change the labels to say that dataset 1 is a graph of y = x

examples/graph_incoming_data_rescale.cpp Outdated Show resolved Hide resolved
@optseb
Copy link
Contributor

optseb commented Oct 4, 2024

Oh, would it be a good idea and easy to throw an error if an update() was called with rescale_y set true to avoid unexpected behaviour?

@fabien-colonnier
Copy link
Contributor Author

I tested and corrected to have the full support of auto_rescale in the update function and added the auto_rescale_fit to fit the y axis. It is more complicated in the x axis as it is shared for different curves.

@fabien-colonnier
Copy link
Contributor Author

As I am writing this, I realize the auto_rescale_fit function doesn't handle multiple curves on one y axis. It will resize the axis according to the last dataset to be updated...

@fabien-colonnier
Copy link
Contributor Author

I added a comment for now, as It means rechecking all the datasets or storing the min and max for each one... which is tedious...

@sebjameswml
Copy link
Collaborator

All looks good now.

@sebjameswml sebjameswml merged commit 6132617 into ABRG-Models:main Oct 5, 2024
6 checks passed
@fabien-colonnier fabien-colonnier deleted the rescale_y branch October 7, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants