Jfreechart vertical line is blurry

匿名 (未验证) 提交于 2019-12-03 02:38:01

问题:

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.

回答1:

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:



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!