drawing smooth curve

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
plunavat
Posts: 29
Joined: Sun Jan 01, 2012 10:59 am
antibot: No, of course not.

drawing smooth curve

Post by plunavat » Thu Mar 05, 2015 1:32 pm

Hello,

i have couple of points and want to draw smooth curve on XY Scatter plot which best fits all points as shown below (blue colour line with pink colour points). sometimes the points would be too scattered, but still i would require smooth curve
Image

I tried using XYSmoothLineAndShapeRenderer but the line is not as smooth as required
Hint: can we use something like Bezier curve or spline curve? If Yes please let me know how to implement the same

if required i can upload the code which i have done..

Thanks in advance,
Pranav C Lunavat

plunavat
Posts: 29
Joined: Sun Jan 01, 2012 10:59 am
antibot: No, of course not.

Re: drawing smooth curve

Post by plunavat » Mon Mar 09, 2015 10:55 am

Hello,

can any body help me out about how to use bezier curve in XY scatter chart

Regards,
Pranav C Lunavat

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: drawing smooth curve

Post by paradoxoff » Mon Mar 09, 2015 11:16 am

Googling for "java bezier curve from points" gives the following link as first hit:
http://www.java2s.com/Code/Java/2D-Grap ... rcurve.htm

Locked