07-17-2023 04:15 PM - edited 07-17-2023 04:35 PM
Hello all!
I have a vertical stack of XY plots, and I am struggling to get the Y Axis labels to align vertically down the stack. I know this is a nit pick, but I know a user or two will complain if I can't align the labels. Here is the very worst of it, I once solved this problem on a project a few years ago, but my old brain can't remember how, and I don't have access to that source code.
Here is my plot stack:
Notice how the Y-axis name labels move left and right depending on the width of the y-axis scale number widths.
I tried making the Y axis scale font monospaced with spaces padding on the left, but the width of the spaces is narrower than the width of the numbers so that didn't work. (it does work when padding zeros, or using scientific notation, but that detracts from readability, and it is all about readability for this project)
I tried using the YScale.NameLbl.Position property, but oddly, setting the top position works, but setting the left position does not. (Example of the property not working is attached)
Any help would be appreciated!!
Solved! Go to Solution.
07-17-2023 05:16 PM
07-17-2023 07:18 PM - edited 07-17-2023 07:19 PM
I had tried Consolas, but I made the mistake of not also switching from auto format to manual so it really did nothing to help me. I got it applied correctly based on your post and I'm quite happy with the result now.
I added a bit of logic on graph rescale events to keep walking the format string down as the zoom gets tighter. I'm quite happy with the result:
Here is the block diagram of the VI that modifes the format as scale is changed:
Obviously the scaling thing is a matter of taste, but I was pretty happy with this level of effort for my application. I attached the VI that formats the string based on the current scale range.