Comments (9)
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.
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.
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.
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.
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.
Hi @swharden
I am using visual studio. Will try and let you know
from scottplot.
Hi @swharden
I tried plot.Plot.Axes.Right overload, but still its not working and also its impacting the shared axes functionality
from scottplot.
Hi @swharden
I tried plot.Plot.Axes.Right overload, but still its not working and also its impacting the shared axes functionality
???
from scottplot.
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)
- New plot type: binary signal HOT 2
- Where is OnNan property in ScottPlot 5? HOT 1
- "Show Value On Hover" in plot with multiple scatter traces HOT 1
- Label: incorrect horizontal alignment for multiline strings HOT 2
- Crash when Label text is null
- SP5 Heatmap: How to calculate Heatmap from the minimum data value HOT 1
- Graphs are getting overlapped when align one below the other HOT 1
- SP5 Heatmap: New features from SP4 HOT 1
- SP 5: Fastest way to update Heatmap data HOT 1
- Tick generator: add a flag to hide labels N pixels from the edge of the figure
- Cookbook: demonstrate heatmap `CellWidth` and `CellHeight`
- Image: new plot type for displaying image files
- Ticks: how to use a custom string format for DateTime ticks HOT 4
- Interactivity (like dragging axis lines) is slow on plots with large datasets HOT 3
- The scatter line does not display when the x-axis is logarithmic HOT 2
- ScottPlot get_legend method non-existent in ScottPlot.WPF 5.0.27-up HOT 2
- Avalonia Application Flickering Solution HOT 1
- ScottPlot.WPF 5.0๏ผAxis does not implement the SetBoundary method HOT 2
- DataLogger: odd behavior when dataset is empty
- How to impose left and right restrictions on the `DateTime Axes`? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scottplot.