Skip to content

Keeping max y values inside plot rectangle when zooming in and changing only x axis min-max  #192

@G-Alevizos

Description

@G-Alevizos

First of all, great work with this library, it has helped me a lot during the past few days.

My issue is that I am trying to simulate the behaviour below
sample
in which the y axis is limited to the maximum y value of the input data and the x axis gets resized when zooming in.

I haven't really found a way to replicate this with ImPlot and after a look at the code, I hypothesize it has something to do with setting the max-min y value of the plot rectangle with the local input data max-min and resizing the x-axis accordingly based on the zoom_rate.

I have also tried the ImPlotFlags_Equal flag but it is not suited to my case.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions