I am using the lines command (x lines) to join x co-ordinates on two plots on different y axes. However, although I specify the upper and lower limits of the lines (upper = my plot y values, lower = Fixed Values) the lines do not extend all the way to the line (see below). Please can you tell me what I am doing wrong? Thanks!
Also, is it possible to do lines that are not straight, to join points with the same points on a different x-axis?
Just to clarify my second request, this is the kind of “non-strait” lines I mean! Thanks2 years, 8 months ago dgteamModerator
Without seeing your data it’s hard to see where this may be going wrong but see if this helps.
Consider a simple example. Here we have a Plot command drawing a line.
To add straight lines at intermittent locations, here is the data and the Lines command, where another column is added to specify the xlines.
The Upper limit is using the same y column as the Plot command.
So first thing you may want to double check that the Y columns are set appropriately.
It looks like ultimately you want to have lines that connect two plots. To draw the lines at an angle you could use a Connect command.
I see that you also using several split axis. Are the commands for the line plots you want to connect in the same axis? Or are you joining these?
Thanks for the quick reply. I have checked my Y columns and they are set appropriately. I tried making a new graph with the same data but with no split axes, and I still have the same problem. Shall I email you the file so you can see if you can spot the issue?
Re my second question, Thanks for the tip re: Connect. The points I’d like to connect are between two curves that are on different y axes and different x-axes (but plotted one above the other, with x axes of the same length).
Cheers, Clara2 years, 8 months ago dgteamModerator
I think I see what’s happening.
Consider this example and notice how the values ‘xLines’ Column are in the same row at the corresponding (x,y) values.
Now let’s see what happens if the locations are in a single list and I use the y column for the extent.
The x locations are in the correct spot, but the program is using the y-value from the corresponding row.
Clearly, this is not what you are trying to do.
To do this property, use a Map column to create a linked list that will show appropriate y value.
Add a Map column from the other list.
Set up the Map column with the following settings:
- Map – Select the list of x-values
- Method – Change to ‘From Columns’
- Key – x column you want to link or map
- Value – the column you want to return (output)
Use the mapped column (here called ‘yList’) as the Upper Extent in the Lines command)
Now, you have the right y values where you have x lines drawn.
Looking at your data, it would appear that a mapping column to pull the corresponding y-values would work. Please try this out and let us know if you have any trouble.
If you are still having trouble, you’re welcome to send the file to our help email for us to take a look.
One possible problem is that the values in the x-lines list do not have an exact match in the time column. Let us know if that happens because I think there is another work around.
Thanks for your really detailed and helpful response. I tried the Map column but it produced an empty column, probably because as you said, the exact values were not available. So I interpolated values to exactly the right ages and inserted a “manual” ylist column. Now the line limits are correct. Thanks!
Next I will try your above tip to join points on different graph/axes using connect..
You must be logged in to reply to this topic.