Replies: 2 comments
-
Same question myself. Just reading through the code, it's not really clear what multiple custom y axes would be for. The code is very readable, and very clearly builds one set of bounds out of all the items you hand the plot, and makes a single transform for them, and then draws them all with that transform. So it appears the plot code just doesn't support this at all. I'm in a similar boat, trying to plot related signals in different scales against each other. I'm considering just trying a super janky thing where I draw two entirely different Plots on top of each other and just disable all decoration on the second one. We'll see how it goes... |
Beta Was this translation helpful? Give feedback.
-
Actually, I found a halfway-decent solution, and suspect this might be what the custom_y_axes thing is for. It's janky, but when I generate each Line, I scale the y values in the points by some scalar to bring everything into roughly the same range, and then I add multiple custom_y_axes and give each a formatter that divides the tick mark value by the same scalar. So for example, if I'm plotting voltage in the 0-100 range and amperage in the 0-3 range, I multiple all amperage values by 33.0, and then add a second custom axis that divides the tick value by 33.0. Actually works fine. |
Beta Was this translation helpful? Give feedback.
-
Dear egui community,
I tried to plot multiple signals such as temperature, pressure and position over time.
Each signal is independent, and I would like to plot them on the same graph but with independent y-axis. However, my issue is that the signals doesn't scale to their respective y-axis but with the main y-axis...
How to fix it ?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions