Reputation: 678
I use gnuplot 4.6 release and 5.0 development versions on Linux, Mac, and Windows.
I tried to make basic output to relatively recent supported HTML5 canvas terminal and receive pretty blurry image on canvas.
What I did is the following in the interactive mode:
set terminal canvas
set output "test-canvas.html"
test
Here is the result.
The print-screen of such a html5 canvas is HERE.
It's svg counterpart is HERE. Both are drawn by vectors but they appear very different image qualities.
Similar situation also appears on other sites, for instance, here.
Does anyone know how to improve the image quality? I don't know much about HTML5 canvas but by looking into the source code, I think the image is constructed in a vectorial way, which means the image should be very crispy up to antialias capability.
Any solution? Thanks!
Upvotes: 1
Views: 430
Reputation: 48430
I'm not sure what you mean with 'blurry'. There has been a bug (#1220 Canvas: Always clear before plotting ) that an image was redrawn on top of the previous one on mouse-over. That resulted in ugly images. To see the effect, go e.g. to the 4.6 demo page and repeat going with the mouse over the image and outside of it.
But that is fixed in the current development version, compare with the image on http://gnuplot.sourceforge.net/demo_canvas_5.0/ Unfortunatelty, that effect cannot be demonstrated here in the answer.
Another point:
Although the image construction suggests, that it is a vector image, which it is not. According to the official canvas
-element description it is effectively a bitmap:
The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly.
So you can get possibly better images using a larger canvas size and larger fonts.
Upvotes: 1