-
Notifications
You must be signed in to change notification settings - Fork 560
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
AlignedPlots: Y/X axis padding over multiple plots #144
Conversation
@epezent |
@ozlb, thanks for looking into this. A few questions:
|
|
Awesome! One other thing: can we add support for vertical alignment when |
new signature ID, ImPool to store padding data, demo
vertical will align Y axis, horizontal will align X axis. *signature changed
I changed signature of function to handle vertically/horizontally using already existing enum |
Love it! Another thought: If we changed Otherwise this looks great, I'll try to take a look tonight or tomorrow. |
signature is ok, but to use as flag, enum
I cross check where is used for legends, labels and should not be problematic. |
Ready for your final approval / refinements / decorations. |
@ozlb , sorry I haven't addressed this. I wanted to first merge organizational changes I've been making in |
I will resolve the conflicts and update PR. |
Sync. to v0.9 and ready for your final approval / refinements / decorations. |
interesing, but before I need to sync to latest version so hopefully it will be merged into master. |
I came here to look for a way to do this, and here's a PR with exactly what I need! This is fantastic work. I think crosshair alignment should be covered separately, as it only depends on X-value linking, which already has a working solution. Once we get visual alignment of X-axis, the rest will work fine. |
Oh yes! |
Can I vote for the ozlb code getting pulled into the main branch - I've got a couple of plots I ended up aligning by modifying the axis text :-( but this would be much better. |
Incidentally (as it's related to alignment)
(using master branches of imgui and implot compiling win64 c++20 under Visual Studio) |
* SubPlots: Y axis padding over multiple plots * Align Plots Group new signature ID, ImPool to store padding data, demo * Align plots orientation (vertically, horizontally) vertical will align Y axis, horizontal will align X axis. *signature changed * ImPlotOrientation used as flag for 2D grids of aligned plots #144 (comment) * AlignPlots updates to merge with v.0.9 * Sync to v0.9 20210127 * subplots proto * make link flags work * stuff * add multi-line centered titles * subplots work * flag ideas * better subplot positioning * resizable subplots * subplot shared items * subplot ratios * some cleanup and refactor * some cleanup and refactor * refactors and demo reorganization * context menus...almost done! * context menus, bug fixes * active id * make implot use ButtonBehavior throughout * bug fixes * more bug fixes * tweaks * fix id issue * finish work on subplots Co-authored-by: ozlb <[email protected]>
Merged as a part of #203 |
To have same Y axis padding,

ImPlot::BeginSubPlots()
must be called before 1stImPlot::BeginPlot()
andImPlot::EndSubPlots()
must be called after lastImPlot::EndPlot()
.#53 (comment)