LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph Appearance

Hi, I've just started using LabWin 9.0, and I want to change the inner border settings of Graph controls.

This is absolutely neccesary since I need to print on page the exact appearance of the graphs. Please look at the atachment that specifies the help I need.

 

Thanks,

 

Sincrono

0 Kudos
Message 1 of 7
(4,244 Views)

I very frequently have to print graphs and I face the same problem. I finally resolved to paint graph border in transparent so make it disappear when printed and paint the plot area with a very light gray colour so that when printed the plot area appears highlighted.

I moved to this solution after trying to put a decoration box on top of the graph, positioning it based on ATTR_PLOT_AREA_TOP and ATTR_PLOT_AREA_LEFT and dimensioning it according to ATTR_PLOT_AREA_WIDTH and ATTR_PLOT_AREA_HEIGHT: the resulting box does not exactly covers the plot area but is some pixel larger than it, possibly because of the 3d aspect of the control (as if the coordinates refers to the outer part of a recessed box while the real plot area is the inner part).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 7
(4,233 Views)

I want the whole graph control to be white except for the bottom and left axes,its numbers and of course the plots.

I don't want to use color differences in order to generate a 'color border' of two colors. I want the bottom and left axis be black lines as usual plots.

Is it posible?

Graph Control was definetly nont designed for this purpose.

0 Kudos
Message 3 of 7
(4,229 Views)

Hi,

 

just a thought: have you tried printing a classical graph control? It might well be that the lines you see (and don't like) result from 3D borders... You don't need to use the classical graph for display, you could have one invisible on your panel, just for printing...

0 Kudos
Message 4 of 7
(4,217 Views)

Ok, that's what I have found: look at this picture

 

Graphs.PNG

 

As you can see, no type of grah has the lower and right border when painted in white or transparent; this depends on the white colour being used to mimic the 3d border on the plot area.

 

The 2 graphs on the bottom have a box added: it's a "Square flat button" found in Classic-type controls >> Toggle buttons palette with transparent interior and positioned and dimensioned with the attributes I mentioned earlier. As you can see, the box is apparently displaced by 1 pixel with respect to the plot area (gridlines are 1 pixel longer than the box on the bottom and right side of the graphand if you look at the origin of the graph you will see that the box does not match (0, 0) point). In my opinion this confuses everybody that wants to look at the graph in detail and not only to have the impression of a phenomenon. Addtitionally I don't know if this displacemente will be constant with different screen resolution, desktop theme and so on.

Finally, the box is painted in solid black and I see no way to modify its border: I would have preferred it to be some shade of gray the same as the gridlines.

For all these reasons I resolved to paint the plot area with a very pale gray (say MakeColor (240, 240, 240); ) that gives the feeling of which is the plot area, has little impact on printing and does not alter user perception of axes and plots.

 

You may want to examine the attached project, which produces the screen reproduced here, and decide which is the best option for your needs.

 

In case you find a way to obtain the graph as you have described that is different from my suggestion please post it here: I would be glad to examine it as I understand that the gray box is not the optimal solution to this problem.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 5 of 7
(4,213 Views)

Can I ask you a question? My graph's background color is black, how can I change it to white, just as your picture?

0 Kudos
Message 6 of 7
(4,046 Views)

Select the colouring tool (the highlighted one in the picture below), right-click on the graph background and choose the color you want from the palette.

 

UIRcolor.png

 

The same procedure applies to set the color of other elements on the UI.

 

NOTE: You cannot set the colour of some objects if either "Conform to system colours" or "Use Windows style for controls" is enabled on the panel



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 7
(4,040 Views)