Giter VIP home page Giter VIP logo

Comments (9)

swharden avatar swharden commented on June 2, 2024

Hi @kareem469, I think you are referring to https://scottplot.net/demo/#shared-axes

Sharing the X but not Y limits was intentional. You can modify this line to achieve the behavior you are looking for.

from scottplot.

kareem469 avatar kareem469 commented on June 2, 2024

Here, the Y1 axis (left side) is updating for all the graphs. But the Y2 axis (right side) is not updating.

Following is the code sample i have used

foreach (var plot in plots)
{
    if (plot != sourcePlot)
    {
        AxisLimits axesBefore = destPlot.Plot.Axes.GetLimits();

        if(GraphZoomAxisTypes.XY.ToString() == cmbAxisType.Text)
                    plot.Plot.Axes.SetLimits(sourcePlot.Plot.Axes.GetLimits());

         else if(GraphZoomAxisTypes.Y.ToString() == cmbAxisType.Text)
                  plot.Plot.Axes.SetLimitsY(sourcePlot.Plot.Axes.GetLimits());

         else if(GraphZoomAxisTypes.X.ToString() == cmbAxisType.Text)
                  plot.Plot.Axes.SetLimitsX(sourcePlot.Plot.Axes.GetLimits());

        AxisLimits axesAfter = plot.Plot.Axes.GetLimits();
        if (axesBefore != axesAfter)
            plot .Refresh();
    }
}

Thanks in advance.

from scottplot.

swharden avatar swharden commented on June 2, 2024

But the Y2 axis (right side) is not updating.

SetLimits() works on the bottom and left axes by default, but there are overloads which let you pass in the right axis and it will adjust that axis.

from scottplot.

kareem469 avatar kareem469 commented on June 2, 2024

Hi @swharden

Can you provide the information about the overloads which let me pass in the right axis and it will adjust that axis.

from scottplot.

swharden avatar swharden commented on June 2, 2024

Can you provide the information about the overloads

I'm on a cell phone at the moment, but if you're using Visual Studio and start typing the method, a tooltip will pop up displaying the different overloads that are available. Ones that accept an IYAxis will allow you to pass in plot.Plot.Axes.Right

from scottplot.

kareem469 avatar kareem469 commented on June 2, 2024

Hi @swharden
I am using visual studio. Will try and let you know

from scottplot.

kareem469 avatar kareem469 commented on June 2, 2024

Hi @swharden

I tried plot.Plot.Axes.Right overload, but still its not working and also its impacting the shared axes functionality

from scottplot.

kareem469 avatar kareem469 commented on June 2, 2024

Hi @swharden

I tried plot.Plot.Axes.Right overload, but still its not working and also its impacting the shared axes functionality

???

from scottplot.

kareem469 avatar kareem469 commented on June 2, 2024

Hi @swharden

For the above query, i observed that when Y axis is zoomed, the X axis is zooming for all the graphs but when i zoom only Y axis, then only the graph on which the mouse exists, for that Y2 is also zooming, and for the remaining graphs only Y1 is zooming.

I wonder how Y1 is zooming for all the graphs at a time and not for Y2?

from scottplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.