Lines Command

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3437
    clara bolton
    Participant

      Hello,

      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?

      Thanks

      Screen Shot 2020-03-20 at 21.35.36

      #3438
      clara bolton
      Participant

        Just to clarify my second request, this is the kind of “non-strait” lines I mean! Thanks

        Screen Shot 2020-03-20 at 22.02.16

        #3439
        dgteam
        Moderator

           

          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.

          Plot1

          To add straight lines at intermittent locations, here is the data and the Lines command, where another column is added to specify the xlines.

          Plot2

          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?

           

           

          #3440
          clara bolton
          Participant

            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?

            Screen Shot 2020-03-21 at 09.31.11

            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, Clara

            #3441
            dgteam
            Moderator

              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.

              Plot3

              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.

              Plot3b

              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.

              CreateMap

              Set up the Map column with the following settings:

              1. Map  –  Select the list of  x-values
              2. Method – Change to ‘From Columns’
              3. Key – x column you want to link or map
              4. Value – the column you want to return (output)

              CreateMap2

              Use the mapped column (here called ‘yList’) as the Upper Extent in the Lines command)

              Plot4

              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.

               

              #3450
              clara bolton
              Participant

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

                Cheers, Clara

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.