Skip to content

Lollipop: How to customize stem thickness? #2556

@benton-anderson

Description

@benton-anderson

The Lollipop.BarWidth property does not affect line thickness. Similar problem in ClevelandDot.

Setting the BarWidth to be super wide compared to your data makes the axis data padding expand, so it's doing something.

After reading the Lollipop implementation thread #842 I'm still a bit confused why Bar is used instead of something like the Line in Scatterplots. Then we could use LineWidth.

I'm interested in working on this issue. If y'all think bars are still the way to go then no problem.

Example:

var plt = new ScottPlot.Plot();

var xs = new double[] { 2, 3, 4, 5 };
var ys = new double[] { 4, 5, 6, 7 };

var lp = plt.AddLollipop(xs, ys);
lp.BarWidth = 100.0;  // Doesn't change width

plt.SaveFig("D:\\lptest.png");

plt.Clear();
var cb = plt.AddClevelandDot(xs, ys);
cb.BarWidth = 5;  // Doesn't change width

plt.SaveFig("D:\\cdtest.png");

System Details

  • ScottPlot Version: 4.1.60
  • Operating System: Win10
  • Application Type: Both Console AND WPF
  • .NET Version: (.net 7.0)

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