Replies: 45 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: |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@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? |
Beta Was this translation helpful? Give feedback.
-
This might mean we need to move a substantial potion of |
Beta Was this translation helpful? Give feedback.
-
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 :) |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
Oh, stupid question. I realize the link you sent is a demo, not a picture! |
Beta Was this translation helpful? Give feedback.
-
no, like floating shaded regions: |
Beta Was this translation helpful? Give feedback.
-
Yep, I just stumbled across that demo and realized that's what you meant. I agree, and it's low hanging fruit. |
Beta Was this translation helpful? Give feedback.
-
another thing that occurs frequently is missing data: https://leeoniya.github.io/uPlot/demos/missing-data.html uPlot also has a boolean |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
Yes, use: void SetColormap(const ImVec4* colors, int num_colors); With an array of colors ordered how you like. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
@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 |
Beta Was this translation helpful? Give feedback.
-
@epezent
|
Beta Was this translation helpful? Give feedback.
-
+1 for 24h format, should be easy to implement. Probably it is enough to have a global flag/enum value somewhere in ImPlotStyle structure |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestions. I'll look into a 24 hour option. |
Beta Was this translation helpful? Give feedback.
-
@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 |
Beta Was this translation helpful? Give feedback.
-
@epezent |
Beta Was this translation helpful? Give feedback.
-
24 hour option |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! |
Beta Was this translation helpful? Give feedback.
-
Let me suggest 2 more improvements:
|
Beta Was this translation helpful? Give feedback.
-
// 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 |
Beta Was this translation helpful? Give feedback.
-
@epezent Awesome! Thank you, this is exactly what I need |
Beta Was this translation helpful? Give feedback.
-
It would be nice to be able to show what plot colors are on what axes. Something like this concept: |
Beta Was this translation helpful? Give feedback.
-
@epezent I'm using |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions