-
Notifications
You must be signed in to change notification settings - Fork 560
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Visualisation Improvement ideas/fixes #53
Comments
I will re-trigger Query improvements, since I'm still updating my own local version with my "beloved" QueryX and main reason is that for my needs Query is not covering: |
Easier said than done, I think. I like the idea, but I won't personally be devoting time to it while other more important issues need to be addressed. By all means, give it a shot and submit a PR if you please.
Same. I do like this idea too. Tracy Profiler does this very nicely.
Yes, digits and overlapping axis labels are the next item on my todo list. It's not very good at the moment, and my idea was more or less the same as yours. I can work on this. |
@ozlb, I'm not opposed to adding your single-axis Query (we would want to support X and Y) to ImPlot. What I am opposed to is baking it into I'd like for us to think about how we could abstract niche "plot tools" like Query and QueryX so that 1) they are separate entities/API calls and completely optional, and 2) so that users can design their own tools outside of Hypothetical API (I really don't know if this makes sense, just spitballing the idea) if (ImPlot::BeginPlot()) {
ImPlot::ShowQueryTool();
ImPlot::ShowQueryXTool();
ImPlot::ShowAnnotationTool();
ImPlot::PlotXXX(...);
} I'm curious, could you make QueryX work with the current misc. API? E.g. could you design it outside of void PushPlotClipRect();
void PopPlotClipRect();
bool IsPlotHovered();
ImPlotPoint GetPlotMousePos(int y_axis = -1);
... If not, what additional API function would you need to make it work? |
This might mean we need to move a substantial potion of |
feel free to steal ideas from uPlot, e.g. https://leeoniya.github.io/uPlot/demos/zoom-variations.html high/low shaded bands are also quite useful. nice project, btw :) |
@leeoniya , thank you! Your project is very cool. Is there an online demo readily available? ImPlot can do shaded regions relative to horizontal zero, if that's what you are referring to. |
Oh, stupid question. I realize the link you sent is a demo, not a picture! |
no, like floating shaded regions: |
Yep, I just stumbled across that demo and realized that's what you meant. I agree, and it's low hanging fruit. |
another thing that occurs frequently is missing data: https://leeoniya.github.io/uPlot/demos/missing-data.html uPlot also has a boolean |
I'm not sure if it's implemented yet, as I've had some difficulty in trying to find a way to do it but is the ability to choose colours of a pie chart slice individually currently in? As for the use case below the colours don't match up with their meaning i.e. failure - blue, success -red, etc. So the ability to choose the colours for pie charts and I think bar charts too could be useful if not implemented? |
Yes, use: void SetColormap(const ImVec4* colors, int num_colors); With an array of colors ordered how you like. |
Coming from a scientific background I've needed in the past to have error bars both in the Y and X axis for certain scatter/line plots. I've added examples that I've seen in papers a lot below. As well this could tie in with what @leeoniya suggested with the high/low bands as in the last example. Just throwing out ideas! :D |
@ChiefSeaBiscuit - I was thinking about having a separate array to specify a marker size would be useful, but you have nailed a perfect use-case for this idea. |
@ChiefSeaBiscuit , horizontal error bars should be quite easy to implement. It's a copy/paste of the existing vertical bar functions (appending an I think I might give high/low shaded plots a shot this evening! @sergeyn , buffers for variable size marks is not a bad idea. It needs to be an optional arg or an overloaded of |
@epezent I can give it a go, I'll make a PR when I have some time to devote to it some time this week. Regarding the functions should the names be PlotErrorBarsV and PlotErrorBarsVH, as this might avoid ambiguity, or PlotErrorBars for the current and PlotErrorBarsH for the additional one? |
Keep the vertical names as is. Since vertical bars are usually the most common it should be fairly obvious. This is consistent with PlotBars. Also, the post fix V has its own meaning in core ImGui (variable argument). |
@epezent |
Thanks, I fixed it. |
|
How would you feel about using the Alt and Shift modifiers to constrain Query drag horizontally/vertically instead (sort of like Photoshop/Illustrator if you've ever used those programs) |
i would prefer a modifier combination to move and by default constrain the drag directions; anyhow it's a solution. |
|
what about up to 4 y axis?! |
@epezent Can you give any suggestions on how to implement shared axes between multiple plots ? I have dataset which i cannot plot in the same plot and would like plot in different plots and share the x axis between them . So that zoom, scrolling are applied to the shared plots at once ? |
@Prinkesh , It might be possible using |
Is there any functionality in at the moment to label individual Y axes when there are multiple on the plot? |
No, the right-hand side Y axes cannot be labeled at the moment. |
@epezent
|
+1 for 24h format, should be easy to implement. Probably it is enough to have a global flag/enum value somewhere in ImPlotStyle structure |
Thanks for the suggestions. I'll look into a 24 hour option. |
@ozlb , by this do you mean "now" as in set the min/max to the current time, or "now" as in return to the current minimum/maximum of the plot if you've navigated away?
We can add something to |
@epezent |
Thank you so much! |
Let me suggest 2 more improvements:
|
// Hides or shows the next plot item (i.e. as if it were toggled from the legend). Use ImGuiCond_Always if you need to change this every frame.
IMPLOT_API void HideNextItem(bool hidden = true, ImGuiCond cond = ImGuiCond_Once); You should be able to just call |
@epezent Awesome! Thank you, this is exactly what I need |
@epezent I'm using |
Obviously it’s happening also in “real time” mode... i had some trials but probably out of direction. The only option is to do my own external axis and embed everything in a “table” context. |
@ozlb, this is a rather complicated problem due to the order in which all of the bounding boxes are determined:
A few ideas):
I'm swamped right now with work, but I'd be happy to continue the discussion in a new thread and review any PRs. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
1.) Minor ticks should not suddenly become major ticks, but gradually blend into major ticks. New minor ticks should blend in out of completely transparent ones. This will look much nicer when you do zooming, especially very rapid zooming. The point is not to have sudden changes in an image

2.) Add very mild animation on zooming - instead of sudden changes in zoom, zoom in gradually, starting at very fast speed, and slowing down when reaching zoom target, play the whole animation within 0.5-0.8second so it is still as sharp and responsive and not annoying. Also put it on a flag
3.) When zooming in, amount of digits for each tick grows and at some point they start to overlap.
I suggest skipping outputting text for ticks which will overlap with previous tick, with preference for major ticks of course.
The text was updated successfully, but these errors were encountered: