且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Jfreechart垂直线模糊

更新时间:2022-10-25 19:33:56

有关更多信息,我无法解释渲染和问题中说明的重采样工件。从


I am using JFreechart to generate some plots, and I found the lines in my plot is blurry, but the demo shows that all the lines are thin and without any blurry, I was wondering if there any to generate good quality plot on a panel.

With more information, I can't explain the rendering and resampling artifact illustrated in your question. Starting from MinMaxCategoryPlotDemo1.java in the demo, I added this line to get the PNG image shown.

ChartUtilities.saveChartAsPNG(new File("temp.png"), jfreechart, 1024, 768);

In particular,

  • I chose a larger size, as it's generally better to have more pixels than fewer when resampling.

  • I chose PNG, a lossless image format used in the MinMaxCategoryRenderer API image.

Click to enlarge: