02-21-2025 03:41 PM
Why isn't the smaller yellow point in the dead center of the red one, as is anticipated for two points with the same coordinates? Here are two examples where the only thing different is the Plot appearance. 2024 Q3.
Code:
Front Panel example 1:
Front Panel example 2:
My guess is that this is a "feature" of plots and I should use a picture instead.
02-21-2025 04:38 PM
I think it is due to the different line widths used for the points.
02-21-2025 04:51 PM
There is no subpixel positioning (similar to antialiasing) and everything is quantized to pixels. If you mix dots with even and odd number of pixels across, it is impossible to align them. One has the center on a pixel and one has the center halfway between two pixels.
(But I agree it looks worse than that, especially with large dots 😄 )
02-21-2025 06:24 PM
must be an optical illusion I see a white square
02-23-2025 06:47 AM
@Jay14159265 wrote:
must be an optical illusion I see a white square
The two squares are actually the same size!
02-24-2025 10:55 AM - edited 02-24-2025 10:56 AM
@mcduff wrote:
I think it is due to the different line widths used for the points.
Yes, that's the issue. I would think that the point's symbol should be centered around its x, y coordinates, no matter the width.
02-24-2025 10:58 AM
@altenbach wrote:
There is no subpixel positioning (similar to antialiasing) and everything is quantized to pixels. If you mix dots with even and odd number of pixels across, it is impossible to align them. One has the center on a pixel and one has the center halfway between two pixels.
(But I agree it looks worse than that, especially with large dots 😄 )
I understand how quantization could be an issue, but I agree it looks much worse than being off by a pixel.
02-25-2025 08:33 AM
@ajbradford wrote:
@mcduff wrote:
I think it is due to the different line widths used for the points.
Yes, that's the issue. I would think that the point's symbol should be centered around its x, y coordinates, no matter the width.
That's hard to do if you have an even number as thickness. 🙂
03-03-2025 10:58 AM
@Yamaeda wrote:
@ajbradford wrote:
Yes, that's the issue. I would think that the point's symbol should be centered around its x, y coordinates, no matter the width.
That's hard to do if you have an even number as thickness. 🙂
Fair enough - but take a look at those graphs again. The center of those points are not off by a single pixel, which would be what I'd expect if the only problem was even vs odd. And the offset is in different directions. I'm assuming that those points have an arbitrary center that wasn't meant to be scrutinized this closely.
03-03-2025 11:47 AM
Ok I'm digging a little deeper, here's a pixel grid breakdown of one of the examples:
1st blue dot: Center of white symbol (6x6) (I thought I had chosen yellow as the color, but I think it must have been at night when I had my night light on haha)
2nd blue dot: True origin based off of the axis ticks
3rd blue dot: Center of red symbol, assuming it's 12x12.
4th blue dot: What looks like should be the center of the red circle. The circle is just missing a red pixel on the right side and bottom, but that would make it a 13x13 symbol, not 12x12.
I would expect something like this instead:
1st blue dot: Center of both white and red symbols (6x6 and 12x12 respectively)
2nd blue dot: True origin based off of the axis ticks and what looks like should be the center of the red circle.