Skip to content

PlotScatter fails plotting a single point when line width is >0 #948

@avshiza

Description

@avshiza

We are facing the same issue PlotScatter fails plotting a single point #126
in ScottPlot nuget version 4.0.48 (.net framework 4.7.2) when using PlotScatter and line width is set to >1. Is this fix mentioned in the related link avaiable in this version?
Error Details

Parameter is not valid.
   at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   at System.Drawing.Graphics.DrawLines(Pen pen, PointF[] points)
   at ScottPlot.PlottableScatter.Render(PlotDimensions dims, Bitmap bmp, Boolean lowQuality)
   at ScottPlot.Renderer.DataPlottables(Settings settings)
   at ScottPlot.Plot.RenderBitmap()
   at ScottPlot.Plot.SaveFig(String filePath, Boolean renderFirst)

This is the code we are using:

var pltNew = new ScottPlot.Plot(640, 480);
pltNew.PlotScatter(new double[1] { 0 }, new double[1] { 2 }, markerSize: 1, lineWidth: 1, color: ColorTranslator.FromHtml("#FF4848"));
pltNew.SaveFig(string.Format(@"{0}test.png", Program.pathPrefix));

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGunexpected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions