Skip to content

SP5 Scatter: Fix line renders even on Width of LineStyle to zero#2750

Merged
swharden merged 4 commits intoScottPlot:mainfrom
dayo05:main
Jul 13, 2023
Merged

SP5 Scatter: Fix line renders even on Width of LineStyle to zero#2750
swharden merged 4 commits intoScottPlot:mainfrom
dayo05:main

Conversation

@dayo05
Copy link
Contributor

@dayo05 dayo05 commented Jul 13, 2023

Closes #2739
Purpose:

Buggy features are introduced on that issue. This provides extra information by my research.

The code I provided works fine(just increase the width a lot instead setting that as zero)

It means rendering with width=0 is not supported on SkiaSharp. So, I just ignore path drawing call on LineStyle is invisible.

In the issue, LineStyle.NoLine just set the Width property to zero and because this affects, I think its required to create extra flow.

using ScottPlot;

double[] dataX = new double[] { 1, 2, 3, 4, 5 };
double[] dataY = new double[] { 1, 4, 9, 16, 25 };

var myPlot = new ScottPlot.Plot();
var scatter = myPlot.Add.Scatter(dataX, dataY);
scatter.LineStyle.Width = 30;

myPlot.SavePng("quickstart.png", 400, 300);

quickstart

@swharden
Copy link
Member

This looks great @dayo05, thanks so much!

swharden added 3 commits July 12, 2023 23:11
to see if the new CI system will automatically fix it after merging into the main branch
@swharden swharden merged commit 8376848 into ScottPlot:main Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SP5: LineWidth is not respected

2 participants