LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two identical points on a XY Graph not showing at same location

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:

ajbradford_4-1740173776368.png

Front Panel example 1:

ajbradford_5-1740173815158.png

 

Front Panel example 2:

ajbradford_6-1740173860439.png

 

My guess is that this is a "feature" of plots and I should use a picture instead.

0 Kudos
Message 1 of 11
(445 Views)

I think it is due to the different line widths used for the points.

0 Kudos
Message 2 of 11
(428 Views)

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 😄 )

0 Kudos
Message 3 of 11
(419 Views)

must be an optical illusion I see a white square 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 4 of 11
(389 Views)

@Jay14159265 wrote:

must be an optical illusion I see a white square 


The two squares are actually the same size!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 11
(361 Views)

@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. 

0 Kudos
Message 6 of 11
(313 Views)

@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. 

0 Kudos
Message 7 of 11
(311 Views)

@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. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 11
(282 Views)

@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.

0 Kudos
Message 9 of 11
(207 Views)

Ok I'm digging a little deeper, here's a pixel grid breakdown of one of the examples:

ajbradford_0-1741022351035.png

ajbradford_1-1741022455562.png

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:

 

ajbradford_3-1741023152662.png

ajbradford_4-1741023296451.png

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.

0 Kudos
Message 10 of 11
(204 Views)