question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow Array of Markersize in AddScatter

See original GitHub issue

Currently it looks like in AddScatter the marker size can only be set for the whole series, but not individually. Would it be possible to accept an array of marker sizes so that each marker gets its own size?

` //current State formsPlot.Plot.AddScatter(xDate.ToArray(), ci.Data.ToArray(), Color.GreenYellow, lineWidth: 0, 5, MarkerShape.filledSquare);

//possible?
formsPlot.Plot.AddScatter(xDate.ToArray(), ci.Data.ToArray(), Color.GreenYellow, lineWidth: 0, markerSize.ToArray(), MarkerShape.filledSquare);
`

You can currently create the behavior only with the AddPoint methode. However, you do not get a legend entry here. Maybe it is also a problem for performance if you add a lot of points with AddPoint?

Would be cool if you could do that with AddScatter: image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
swhardencommented, Feb 20, 2021

Hey @AlgoExecutor, thanks for this suggestion! I’m currently focusing on some larger immediate goals (documenting the new 4.1 version and getting it out of beta), so I’ll add this issue to the triage list (#716) and return to it once some of the more pressing issues are resolved 👍

0reactions
AlgoExecutorcommented, Feb 16, 2021

AddPoint can be an alternative as @swharden noted. However, the current problem here is performance. A small measurement shows the following:

image

Tested with version: ScottPlot 4.1.7-beta

Number of points for every series: 1: 1971 2: 4402 3: 2546 5: 278 6: 496

Every point series have its own color / marker and variable size for every marker. Since e.g. AddScatterPoints renders faster I thought it would be a good thing to put the variable size for the markers there. Of course it could also indicate a general problem with AddPoint?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Put an array inside 'MarkerSize' value field.
Hello, I'm plotting a set of points and I'd like their sizes to be variable. I salved the points' coordinates inside the matrix...
Read more >
matplotlib.pyplot.scatter — Matplotlib 3.7.2 documentation
A scatter plot of y vs. x with varying marker size and/or color. Parameters: x, yfloat or array-like, shape (n, ). The data...
Read more >
Plot Type: Scatter Plot - ScottPlot 4.1 Cookbook
A ScatterPlotDraggable lets you move the points around with the mouse. As you move the points around, the values in the original arrays...
Read more >
Styling markers in Python
The marker_symbol attribute allows you to choose from a wide array of symbols to represent markers in your figures. The basic symbols are:...
Read more >
pyplot scatter plot marker size - python
In order to obtain a marker which is x points large, you need to square that number and give it to the s...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found