LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drawing Straight Lines on an XY Graph

Solved!
Go to solution

I'd like to draw two simple straight lines defining lower and upper boundaries on an XY graph and control the color of the lines. The only solution I've found so far is to use a decoration and then control the color of the decoration line with property nodes. Is there a better method? 

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

You can create two more plots on the graph.

0 Kudos
Message 2 of 7
(4,671 Views)

Thanks - I'll check into that. Unfortunately my data points are little dots scattered about the XY Chart and the lines I'm looking to add would be solid. At the moment I'm now just changing the background color of my plot to accept the black color of the decoration lines. I was hoping to not have to go to the extra steps (property node / VI reference) required to change the color of the decoration lines.  

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

Hi dcopes,

 


@dcopes wrote:

Thanks - I'll check into that. Unfortunately my data points are little dots scattered about the XY Chart and the lines I'm looking to add would be solid. At the moment I'm now just changing the background color of my plot to accept the black color of the decoration lines. I was hoping to not have to go to the extra steps (property node / VI reference) required to change the color of the decoration lines.  


As said before: add two more plots to your graph…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(4,643 Views)
Solution
Accepted by topic author dcopes

You chose to plot your existing data points as "dots".  You now potentially want to create two more XY Plots consisting of a colored Straight Line, each of its own color.  Answer the following questions:

  • How many points do you need to specify for your Straight Line?
  • How do you make those points plot as a line instead of a collection of points?
  • How do you specify the color of such a line (and any other Line Properties you might want)?
  • What you do need to do to have the plot show multiple sub-plots?

You should be able to get the answers to these questions using the LabVIEW Help or the Tutorial material.  Or ask your fellow students.

 

Bob Schor

Message 5 of 7
(4,642 Views)

Oh, yes! Just because I'm not connecting the dots on the first plot doesn't mean I can't connect the dots on the 2nd and 3rd plots (i.e. the desired boundary lines).

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

Yep.  And (as I remember from High School Geometry), "Two Points determine a line", so those two lines are "cheap".

 

Bob Schor

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