SignalXY: Fix final segment is not being rendered#3495
Merged
swharden merged 4 commits intoScottPlot:mainfrom Mar 19, 2024
Merged
SignalXY: Fix final segment is not being rendered#3495swharden merged 4 commits intoScottPlot:mainfrom
swharden merged 4 commits intoScottPlot:mainfrom
Conversation
Contributor
Author
Vertical SignalXY with Inverted X Axis:using ScottPlot;
namespace Sandbox5;
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
Size = new Size(800, 450);
Text = "ScottPlot5-WinForms for Issue 3423";
// SignalXYSourceDoubleArray Rotated
double[] xs3 = Generate.Consecutive(3);
double[] ys3 = Generate.Repeating(3, 4);
var signalXY3 = formsPlot1.Plot.Add.SignalXY(xs3, ys3);
signalXY3.Data.Rotated = true;
signalXY3.Label = "SP5:SignalXY Rotated with Inverted X Axis";
signalXY3.LineWidth = 5;
formsPlot1.Plot.Axes.SetLimitsX(8.1, -0.1);
formsPlot1.Plot.ShowLegend();
formsPlot1.Plot.HideGrid();
formsPlot1.Refresh();
}
}Vertical SignalXY with Inverted Y Axis:using ScottPlot;
namespace Sandbox5;
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
Size = new Size(800, 450);
Text = "ScottPlot5-WinForms for Issue 3423";
// SignalXYSourceDoubleArray Rotated
double[] xs3 = Generate.Consecutive(3);
double[] ys3 = Generate.Repeating(3, 4);
var signalXY3 = formsPlot1.Plot.Add.SignalXY(xs3, ys3);
signalXY3.Data.Rotated = true;
signalXY3.Label = "SP5:SignalXY Rotated with Inverted Y Axis";
signalXY3.LineWidth = 5;
formsPlot1.Plot.Axes.SetLimitsY(2.1, -0.1);
formsPlot1.Plot.ShowLegend();
formsPlot1.Plot.HideGrid();
formsPlot1.Refresh();
}
} |
Member
|
This is fantastic @MareMare, thanks for your quick work on this one! 🚀 |
Contributor
Author
|
Thank you for your time! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This will fix issue #3423
test code:
Changes were made to mimic the way conditions were determined in SP4.
Also, the
GetIndexmethod is now public in SP5, so we left it as is.