Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Scatter with pointsize #1

Closed
SteffenPL opened this issue Aug 31, 2020 · 3 comments
Closed

Scatter with pointsize #1

SteffenPL opened this issue Aug 31, 2020 · 3 comments

Comments

@SteffenPL
Copy link

SteffenPL commented Aug 31, 2020

Thanks for the great package!

Is it possible to add functionality to define the size of scatter points individually?
Or is there a way to archive this with the current package?

@wsphillips
Copy link
Collaborator

Sorry for taking so long to comment: Do you mean you want individual data points to be sized differently in a single set of data? I haven't personally tried this, but my guess is you might have to pre-filter the data to accomplish this (e.g. begin plot, then plot all points size #1, plot points of size #2... end plot) while modifying the styling between the scatter plot calls.

Note also the plot styling is in the process of getting fleshed out more and more upstream in the implot C++ library.

@wsphillips
Copy link
Collaborator

wsphillips commented May 26, 2021

You should be able to get this behavior by adapting the code here. (It's generally what I described before)

Specifically, make a loop that changes marker size via ImPlot.SetNextMarkerStyle on each iteration and subsequently calls ImPlot.PlotScatter. The data passed to PlotScatter should correspond to the points you want at each particular size.

Edit: Note you'll need to be on main branch for this to work.

@SteffenPL
Copy link
Author

Thanks a lot!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants