I want to draw a chart for a function y=x^2 as follows:
but the curve is not smooth as it is a set of connected lines.
how can I make the curve smoother ?
thanks
You should use Path.quadTo
with only one Path
. If you are already doing this then I suggest increasing the number of points on the graph.
Move to the beginning of the Path
:
Path.moveTo(x, y)
in the middle:
Path.quadTo(lastX, lastY, (x + lastX)/2, (y + lastY)/2)
and at the end:
Path.lineTo(x, y)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With