Skip to content

Plot figure has a thin black border in SVG #3709

@sproott

Description

@sproott

Issue: Clearing the canvas before applying the figure background seems to cause hairlines at the edges of the plot (see my original issue). This can not only be seen when the resulting SVG is used in a QuestPDF document, but also when viewing an exported SVG via inkview at certain window sizes (see hairline on the right side of the screenshot below).

image

From my initial investigation, the first Clear call is issued by the following code: https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5/Rendering/RenderActions/ClearCanvas.cs. Is this call necessary, when the whole canvas is then filled with the figure background? My first instinct to fix the hairline issue would be to remove this rendering step altogether, but I'm not sure what implication it has in other parts of the library.

ScottPlot Version: 5.0.26

Code Sample:

new Plot().SaveSvg("bug.svg", 800, 600);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions