LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Easy one: XY Graph

Hi!

I have two very easy (even if I've searched the answers without success) questions about XY Graphs. First, I'd like to see the X and Y axes, but I did not found how. And second, as I'm displaying a circle, I'd like the graph to be perfectly square. 'Cause even if I have constant and equal ranges for X and Y (-1 to 1), I can't make it perfectly square in the front panel because the sizes (height and width) of the XY graph aren't equals. Thanks.

Phil
0 Kudos
Message 1 of 7
(3,520 Views)
If the axis labels are not visible, it's because you turned them off by either deselecting them - right click, Visible Items>X Scale (or Y Scale), or you enlarged the plot area by dragging it. Drop a new XY graph on your front panel and you should have an Amplitude and Time Scale. When first dropped on the front panel, the scales are equal. If you want to enlarge or shrink the scales equally, select one of the corners to drag and hold down the shift key. You can also set the plot area programatically by using a property node. Plot Area:Size sets the height and width
0 Kudos
Message 2 of 7
(3,520 Views)
Thanks for the trick about shift key to enlarge X and Y equally. But I'm not sure we understand each other about seeing the axes. I'm not really interested in seeing the scales, but, as my chart goes from -5 to 5 in both directions and as I'm plotting a circle, I'd like to see the axes themselves, just that + in the middle of my chart. I found that I can add a cursor to do so, but it's not really what it is done for...

Thanks again

Phil
0 Kudos
Message 3 of 7
(3,520 Views)
I think you're talking about the gridlines. The default colors can be kind of faint depending on the monitor but they are easy to change. If you can't seem them at all, right click on the graph and choose properties. Select the Scales tab. Click on the Grid Style and you'll have option for both major and minor transparent, major a color and minor transparent, and major and minor both colored. Once you've selected the style, click on the color box and choose the colors you want. You'll have to do this for both axes. Once you have them visible, you can then just use the color tool to change them.
0 Kudos
Message 4 of 7
(3,520 Views)
Phil747 wrote in news:5065000000050000001BA50100-
1079395200000@exchange.ni.com:

> Thanks for the trick about shift key to enlarge X and Y equally. But
> I'm not sure we understand each other about seeing the axes. I'm not
> really interested in seeing the scales, but, as my chart goes from -5
> to 5 in both directions and as I'm plotting a circle, I'd like to see
> the axes themselves, just that + in the middle of my chart. I found
> that I can add a cursor to do so, but it's not really what it is done
> for...
>
> Thanks again
>
> Phil

How about adding two more lines to the graph-- one from [0 Ylim(1)] to [0
Ylim(2)] and the next from [Xlim(1) 0] to [Xlim(2) 0]??

>> plot([1:100]-50, [1:100]-50)


>> set(gca,'visible','off
')

>> h1=line([ 0 0] , get(gca,'ylim'))

h1 =

102.0010


> h2=line(get(gca,'xlim'),[0 0 ])

h2 =

103.0004

>> set(gcf, 'color','white')

You can change the properties of the new "Axes" by adjusting the handle
graphics properties of h1 and h2

Scott
0 Kudos
Message 5 of 7
(3,520 Views)
We're getting closer. And I'm sorry to have a bit of troubles to express myself in english. I've found were to changes the gridlines attributes, but my final wish is to have the + passing by the origin highlighted. In fact, I want to clearly see the 2 lines of equations x=0 and y=0. I need to see the grid to, but those 2 lines must be highlighted. I could add 2 clusters (x,y) to my input array of clusters for XYgraph express VI, but I'm wondering if there's an other way to see those 2 lines.
Thanks again, I appreciate.

Phil
0 Kudos
Message 6 of 7
(3,520 Views)
Sorry for misunderstanding. The only ways I know are to add the additional clusters like you mentioned or to add a cursor.
0 Kudos
Message 7 of 7
(3,520 Views)