Jfreechart vertical line is blurry

前端 未结 1 799
有刺的猬
有刺的猬 2021-01-24 10:42

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

1条回答
  •  执笔经年
    2021-01-24 11:17

    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:

    0 讨论(0)
提交回复
热议问题