Shaded area beneath lines on a scatterplot

DataGraph Forums General Getting Started Shaded area beneath lines on a scatterplot

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #7510
    jake_b
    Participant

      hi,

      I would like to plot X v Y, and at the same time, have a transparent shaded area (so the points can still be seen on top of it) where X < n and Y < n.

      I have managed to create the area that I want using the “connect” command, but can’t work out how to fill in this area. Is there a better way that I should be doing this? thanks

      #7511
      jake_b
      Participant

        PS if possible, I would also like to be able to label only the points that fall outside of this area (i.e. X >n or Y > n).

        #7512
        dgteam
        Moderator

          Could you send a screenshot?  Think it would help know what you are seeing.  Wondering if this is the ellipsoid shape?

          In terms of having the transparent area – just want to make sure you know that the commands are drawn in layers. So if you if you move the shape with the fill to the top then the points will be beneath.

          Here is a demo:  https://youtu.be/RgXSnXiGuQY

          #7518
          jake_b
          Participant

            example

             

            Hopefully this gives an idea – I want to distinguish the area within the dotted lines from the rest. It’s not essential to be able to fill it, I guess – just thought it might make it look a bit better. It would be useful to be able to label the points outside, though! thanks

            #7522
            dgteam
            Moderator

              Thanks for uploading!  Helps to see that.

              We just uploaded a file that includes these two graphs.  Thought you might be interested in also trying out an oval, in addition to a rectangle. (In DataGraph, go to File > On-line examples to download.  It will be at the top of the list.)

              The highlighted area is drawn with a Region command.

              RectangleOval

              The file is annotated so hopefully you can follow what we did.

              Please take a look and let us know if this helps and any other questions.

              #7524
              r_vlad
              Participant

                Variants

                #7526
                r_vlad
                Participant

                  Variants_1

                  • This reply was modified 3 years, 1 month ago by r_vlad.
                  #7528
                  r_vlad
                  Participant

                    Or you can also do it this way, using sliders. In this case it is possible to adjust the plot interactively

                    #7532
                    r_vlad
                    Participant

                      And here you can see how it’s done

                      Var_3

                      #7538
                      jake_b
                      Participant

                        thanks, that’s v helpful – the region command is definitely useful. Looks good to me!test

                         

                        I’m going to leave it as a rectangular rather than elliptical region this time, but good to know that the ellipse is an option. And it occurs to me that I can just create a new labels column, with only the entries that fall outside those bounds, and label the points that way.

                         

                        thanks v much

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

                      DataGraph Forums General Getting Started Shaded area beneath lines on a scatterplot