LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom multiplot Y scale position in XY graph.

Im posting this topic to share my solution for this "bug" with the position of the Y scales of a multiplot graph, wich do not correctly place themselves on the graph after using the visible property node for the scales, even having the option "Autoadjust scales" on, they sometime overlap to the graph area or on top of other scales.

 

I have been looking for information about this problem and ways to fix it and I havent found that much. Some of the posts suggest using the X scale position property to adjust the scales by yourself. So here its a way of doing it:

 

This VI will position the scales when called (you migth also defer panale updates while calling it). Feed the multiplot graph reference (graph input), tell it how many scales are active (active scales input), the max number of plots (Max plots), Specify wich scales are visibles (Y scale visible? array input [where element 0 should refer to plot 0, element 1 to plot 1 and so on]. Play with the offsets provided in the front panel to adjust your setup. The scales will be positioned at the left of the plot area and ordered from rigth to left (plot 0 beeing the closest to the graph), you migth modify the VI to position the scales diferently. (Keep in mind that changing the plot area width will it's property node will move the scales aswell). Autoadjust scales should be unchecked.

 

 

0 Kudos
Message 1 of 3
(3,178 Views)

Hello Antonio NI,

 

I use your solution and it worked.

 

Best Regards,

Lis Villanueva

0 Kudos
Message 2 of 3
(3,079 Views)

Im glad it helped (=. New version thats sucessfully centers the legend name vertically. If some of you tryed this you migth have notice that you need to execute this function when the autoscale changes and in several ocations if your moving the graph a lot. Since I dindt want to add any overwork I ended up executing this function on a mouse over event in the graph, and rearly in other events that can only ocurr once in a while and not constantly like a autoscale change if you are for example scrolling throw the graph with autoscale active.

0 Kudos
Message 3 of 3
(2,855 Views)