Jump to content

Adding Line Segments to XY Plots

Recommended Posts

Sometimes when looking at an xy plot, it can be helpful to use lines to designate regions of the chart that you'd like users to focus on. In this example, we want to draw a rectangle on the xy plot showing the ideal region of operation, like below. We can do this utilizing Seeq's ability to display formulas overlaid against an xy plot.


1. For this first step, we will create a ~horizontal line on the scatter plot at y=65. This can be achieved using a y=mx+b formula with a very small slope, and a y-intercept of 65. The equation for this "horizontal" line on the xy plot is:



2. If we want to restrict the line to only the segment making the bottom of our ideal operation box, we can leverage the within function in formula to clip the line at values we specify. Here we add to the original formula to only include values of the line between x=55 and 5=60.

.within($x>55 and $x<60)


3. Now let's make the left side of the box. A similar concept can be applied to create a vertical line, only a very large positive or negative slope can be used. For our "vertical" line at x=55, we can use the following formula. Note some adjustment of the y-axis scale may be required after this step. 



4. To clip a line into a line segment by restricting the y values, you can use the max and min functions in Formula, combined with the within function. The following formula is used to achieve the left side boundary on our box:

.within($x<55.01 and $x>54.99) 


The same techniques from steps 1-4 could be used to create the temperature and wet bulb max boundaries.


Formula for max temp boundary:

(0.00001*$x+85).within($x>55 and $x<60)

Formula for max wet bulb boundary:

.within($x<60.01 and $x>59.99)


Edited by Sharlinda Salim
Update title
  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...
  • Sharlinda Salim changed the title to Adding Line Segments to XY Plots

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...