Jump to content

Hi, I'm trying to add a horizontal line of fixed value to my scatter plot but is there a way to add the line so that it shows only for a specified column on the y-axis (controlled by a property control)?


Kom Son

Recommended Posts

image.thumb.png.f6b833de5bb7787db6e54996740ba730.pngHi @Gaia Paolini​  for instance, when the property control is 'tag B change', I would like to have the dotted horizontal line (in red) at y-axis value :15. But if I change the property control to 'Tag A change' I want the horizontal line to also change it's value and location on the y-axis. So like a dynamically controlled horizontal line or set of lines on the plot.

Link to comment
Share on other sites

Create a Text Area and an input Property Control. For instance an Input Field connected to a new real property you will call e.g. lineheight.

In your scatter plot, go to Properties > Lines & Curves > Add > Horizontal Line > Straight Line ...

For Line Position choose Custom Expression and type the name of your document property as ${lineheight}

This will change the position of the line when you type a different numeric value into lineheight.

Alternatively, if you want to choose between two or more pre-specified height values, you can use a drop down list in the Text Area instead and connect to the values of Tag A or Tag B etc. Let's say this property is called lineheight2.

You cannot connect a drop down list to document properties though, only to actual values. See screenshots.

To dynamically change the colour of the line, or to use pre-defined values of Tag A etc, you will need an Iron Python script instead.

lineheight.thumb.jpg.8594345fd0d4d5254fdc07f45372e567.jpg plot.thumb.jpg.d8be5f9a33648972e251b4c2d994bfdf.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...