LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intensity Graph Colorbar Size

Solved!
Go to solution

Hey,

 

I am a bit afraid this is a yes or no question...

Is it possible to scale  the colorbar (Edit: I meant to resize the whole FP element) of a intensity graph during runtime? As far as I can see the "Z Scale.Bounds" property is the one holding width and height but it is read-only. And other than the main plot area the colorbar does not have a "Size" property.

 

Reason why I ask: In my program the window holding the graph must be scalable and the graph is set to "Scale Object with pane". But the colorbar does not scale with the main plot area, so I thought I could rescale it programmatically via a property.... 🤔?

 

THX

0 Kudos
Message 1 of 6
(564 Views)
Solution
Accepted by topic author itchy00

Hi itchy,

 


@itchy00 wrote:

I am a bit afraid this is a yes or no question...


And the answer is "No!"…

 

A similar question came up last week (to show the colorbar horizontally instead of vertical) and the answer was along the lines of "create an additional 2DPictureDisplay to show a color scale created from the ZScale values". That additional indicator would follow your "scale object with pane" settings easily…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(553 Views)

Oh I am sorry I didn't find this in my keyword search... 😑

 

But thanks for making this quick 😉

 

Yeah I was thinking about the same thing, creating a second Fake-Colorbar-Plot showing just the grayscale gradient. I'll try to implement that way

0 Kudos
Message 3 of 6
(548 Views)

I did some deep digging.  Couldn't find anything.

0 Kudos
Message 4 of 6
(491 Views)

@GerdW wrote:

 

 

A similar question came up last week (to show the colorbar horizontally instead of vertical) and the answer was along the lines of "create an additional 2DPictureDisplay to show a color scale created from the ZScale values". That additional indicator would follow your "scale object with pane" settings easily…


or use a 1d array of color box indicators instead of a 2d picture control

 

Spoiler
rainbow.png

 

0 Kudos
Message 5 of 6
(465 Views)

So finally I did it that way with the 2D Picture Display.

 

To be honest, all these solutions are a bit shady. It's alright if you JUST display the colorbar. But once you want axis markers and labels with it, it gets really annoying.

 

First tried to use a simple Intensity Graph hiding everything but the y-axis (swapped to the right side) but that has some downfalls as well - for example an automatic rescaling of the plot area when axis marker values switch between 2 to 3 digits 🙄

 

So my solution is now the 2DPictureDisplay and I build my axis markers and label from StringIndicators with transparent background and I arrange them programmatically relative to the 2DPictureDisplay everytime the window rescales.

 

A bit sad that at this point you're almost at the GUI scripting level that you find in other programming environments (Visual C++, PyQT, ...) having to place the objects via coding... feels like the advantage of LabView is gone somehow at that point 🤷🏼‍♂

 

 

Thanks anyway for all the comments!!!

0 Kudos
Message 6 of 6
(427 Views)