简体   繁体   中英

How can I draw a straight line in jfreechart?

如何在jfreechart图表中用等式y=m*x+n画一条直线?

Sounds simple enough ... I've never used it, but there is a XYPlot class which sounds like a decent place to start. You can create one using the ChartFactory , to make it a bit easier. You will need to implement a class that implements the XYDataSet interface, to return the actual points (ie evalutate your equation).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM