From: Dave D. <dde...@es...> - 2004-08-12 10:44:47
|
Ethan Merritt <merritt@u.washington.edu> writes: > On Monday 09 August 2004 11:04 pm, mi...@ph... wrote: >> Bug: >> On x11 (well, I haven't look to other terminals), points in the points and >> linepoints styles are "handicapped" -- look by a screen magnificator (xmag, >> kmag) to points obtained by: >> >> set size ratio 1 >> plot sin(x)/x w point pt 2 > > That is one strange bug you have found. The odd thing is that it seems > to be a bug in the X server. I can run the same gnuplot_x11 executable > on two different machines and get two different results. My best guess > at the moment is that the key difference is which version of X11 is > running, although it is also possible that it is a difference in the video > driver rather than the version. The issue is whether the rendering > engine does, or does not, draw the final pixel in a line segment that is > at 45 degrees. Changing the drawing style from CapButt to CapRound > while drawing points fixes this, at least on the machines I have tested. > I can't think of any bad effects from this so I will make the change. > I'm sure someone will speak up if it uncovers some complementary > bug on other X11 display setups. > Does gnuplot use zero-width lines for these ? I have a vague recollection that if linewidth is set to 0, the X server can use a device-specific algorithm for drawing the pixels. A linewidth of 1 specifies the exact semantics which must be followed. Yeah - looks like : else if (*buffer == 'P') { /* linux sscanf does not like %1d%4d%4d" with Oxxxxyyyy */ /* sscanf(buffer, "P%1d%4d%4d", &point, &x, &y); */ point = buffer[1] - '0'; sscanf(buffer + 2, "%4d%4d", &x, &y); if (point == 7) { /* set point size */ px = (int) (x * xscale * pointsize); py = (int) (y * yscale * pointsize); } else { if (type != LineSolid || width != 0) { /* select solid line */ XSetLineAttributes(dpy, gc, 0, LineSolid, CapButt, JoinBevel); } - try setting the linewidth param to 1 in the XSetLineAttributes call. dd -- Dave Denholm <dde...@es...> http://www.esmertec.com |