<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi All.</div><div><br></div><div>I am writing plotting library in Scala (<a href="https://github.com/priimak/splot">https://github.com/priimak/splot</a> <a href="https://splot-web.github.io/">https://splot-web.github.io/</a>) but I am having difficulty doing smooth plotting when I have a lot of data points. Consider a following use case. Let say along the x-axis I have array of points from 0 to 0.3 with step 0.001 and on y-axis each corresponding point is computed from some function, let say sin(x). Now I want to plot smooth plot using these points. If I just plot corresponding pixels I might have wholes in the image if I zoom in, so that it is not good. If I just poly line (there is such function in java Graphics2D object) based on these points I have another problem. I have to convert each point into onscreen pixel coordinates (I can use floor(..) or rounding to the nearest int when doing it). And that results in jagged step like line that  you can see here <br></div><div><br></div><div><a href="https://i.imgur.com/t26WDut.png">https://i.imgur.com/t26WDut.png</a></div><div><br></div>That does not happen in matplotlib when let say using fig.plot(...) function. Output is always smooth which is what I want as well. Is there a particular place in code where I can see how that is done?</div><div dir="ltr"><br></div><div dir="ltr">--</div><div>Dmitri Priimak<br></div></div></div></div>