implot icon indicating copy to clipboard operation
implot copied to clipboard

Circle Looks more like Hexagon when s ized

Open aDioS786 opened this issue 2 years ago • 5 comments

Hi Not sure why circle looks more like hexagon, and also if the weight is increased it the boundaries looks like flower.

Circle Code: ImPlot::SetNextMarkerStyle(ImPlotMarker_Circle, radiusSize, FillColor, thickness, OutFillColor); ImPlot::PlotScatter(name, &xyCoordinate[0], &xyCoordinate[1], 1);

image

And this is how it looks like if thickness is increased:

image

aDioS786 avatar Jun 12 '22 23:06 aDioS786

Because the circle is rasterized with 10 points. You can have a look at the method called RenderMarkerCircle in the file implot_items.cpp.

lesauxvi avatar Jun 13 '22 13:06 lesauxvi

Correct. It's not expected for anyone to render markers this large, so circles only use 10 points to keep their cost low. If you need large circles I suggest custom rendering.

epezent avatar Jun 13 '22 13:06 epezent

Correct. It's not expected for anyone to render markers this large, so circles only use 10 points to keep their cost low. If you need large circles I suggest custom rendering.

Because the circle is rasterized with 10 points. You can have a look at the method called RenderMarkerCircle in the file implot_items.cpp.

Many Thanks, I'll try find where it's setting/using 10 points and maybe increase them a bit. Any plan on adding points as an additional parameter in future so we can use increased params if needed?

aDioS786 avatar Jun 16 '22 15:06 aDioS786

Many Thanks, I'll try find where it's setting/using 10 points and maybe increase them a bit. Any plan on adding points as an additional parameter in future so we can use increased params if needed?

No, I don't plan on making points an argument to PlotScatter etc. since it does not apply to any other marker types. But, I do have plans to add a PlotBubbles (see #298). That plotter will probably need a smart way of determining the number of req'd points so that the bubbles are smooth at all sizes. Stay tuned.

epezent avatar Jun 19 '22 04:06 epezent

That be a nice features looks great. Huge thanks to you for ur hard effort doing this project.

One more questions we have a legend on left, is there a way or any built in function we got, say I want to click on first item in legend, when clicked i want the graph or canvas area to focus on that legend/plotted item. Is that possible to pick coordinates and fo cus on that area on click? Thanks

aDioS786 avatar Jun 22 '22 23:06 aDioS786