quick way to change Y axis on existing (complicated) plot

DataGraph Forums Technical Support Support Desk quick way to change Y axis on existing (complicated) plot

  • This topic has 9 replies, 2 voices, and was last updated 5 years ago by dgteam.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2744
    ek4
    Participant

      Hi-

      I’m new.  I have created a scatter plot using multiple masks (so that certain groups of rows are plotted in one symbol, and others are plotted in different symbols).  NOW, I wonder if there is some way to quickly plot different columns for X and Y but using the same masks I created.  Or do I have to go through each pull down menu and change  X and Y for each of the masks?

      #2745
      dgteam
      Moderator

        No, you should not need to repeat – here are a couple of techniques that may help – depending on what you are doing .. and your data format

        First the masks themselves can be copy and pasted.

        Click on the gear menu in the top right corner and select Copy Mask.

        CopyMask

        Next select the command you want to apply the mask to … click that gear menu …. and select Paste mask.

        That is a useful shortcut but might not be what you are looking for based on your description.

        It sounds like you have something more like this …

        Two groups, that both contain an x and a y.

        To illustrate how to replace all the data selected in a command, based on another set of data with the same column names, let’s say we want to plot A and B in the same graph where we omit x = -1.

        data

        First, create a command with the A group, then copy and paste command.

        NOTE:  A handy shortcut is to click the command, and drag while holding down the Option key.  When you Option-drag you see a little green plus to indicate you are making a clone or copy.

        Click+DragCommand

        Replace all of the data selections in the new command, by clicking and dragging the B group and dropping it on the new command.

        Click+DragCommand2

        This will replace every selected data column with a column of the same name, from the new group.

        To convince your self that the data selections are coming from the right group, click any of the selector menus and hover over the selection for either the data or the mask.  (the color for the B data is red)

        You will see the group indicated in the menu, along with a green arrow that points to the column in the data list.

        Click+DragCommand3

        Does this help, so you don’t have to reselect the masks for your data?

         

         

        #2747
        dgteam
        Moderator

          Also – FYI – depending on what you are doing …

          You can use color and marker schemes.  So you have different symbols from the same data set, tied to an attribute of your data.

          Hope this helps!

           

          #2752
          ek4
          Participant

            Thank you to both responses.  And again, I am learning.  I don’t think that the first response is quite what I’m looking for (though I did learn some things by following that).  I believe that the second response (about using color schemes) is closer, but I am having trouble understanding how to use the Global Variable Functions to select rows rather than columns (and wish there were a video).

            Let me try to show what I am trying to make easy, using a fake small data set.  If you look at the data table, I have three types of segments (numbered 2, 3, 4), and I want to always plot each with a specific color (in my example I only have x, y, z data columns but in reality I have hundreds of columns).  I have successfully make a scatter plot of x vs y with segments colored appropriately.  Now, supposed I want to easily make x vs z with the same color scheme.  How can I do this (other than going through masking segments in each individual plot)

            Untitled

            #2754
            dgteam
            Moderator

              Always good to have a simple example!

              Here is what you can do…

              Don’t add any mask in this case, to use a Color scheme you want to draw all the points with one command.

              In total, there are four options in the Points command that can be data driven, Size, Color (outline color), Fill (the fill color), Style (marker style).

              To see them expand the points command.  The menu next to each option is where you can choose a data column.  For example, the Fill can be based on the value in the Segment column.

              After you make this choice, another menu shows to the right where you can select “Create Color Scheme”.

              Points1

              This is quick way to create the color scheme, where every unique value in the column ‘Segment’ is mapped to a color, now your points have that fill color.

              Points2

              There is GIF showing this in How to make a Scatter Graph that would be useful to watch.

              Also, check out the Color scheme page in the reference manual.  That has a couple of GIFs on creating a scheme from scratch and how to edit the colors in the scheme.

              With this approach you can take the three commands you have now, and reduce it to just one command.  Does that help?

              Curious how you want to graph the other columns.  Plot in the same graph? Or would you want each to be a separate graph?

               

              #2757
              ek4
              Participant

                THAT WORKED! Thank you!

                 

                #2778
                ek4
                Participant

                  So now that I have successfully learned to use ‘color schemes’ to uniquely color all rows for each of my “segments” in my data table, I now want to learn how to assign different symbols to specific groups of rows (labeled as segments).  Is there such a thing as “symbol schemes”?  Again, I am setting this up because I want to do hundreds of plots using the sample scheme for my different segments – and I’m finding that I have so many different segments that color differences are not enough to distinguish my segments.  see attached  THANK YOU

                  Untitled

                  #2783
                  dgteam
                  Moderator

                    Looks like you are making good progress!

                    Yes –  you can add a scheme for the symbols.  We refer to this in the documentation as a Marker Scheme.  Is that helpful?

                    One thing that could save you a lot of time is to “flatten” your data.  Then you can output these graphs for each column all at once, without making each graph individually.  We don’t have a good article for this on-line yet.  We will work on that to show you the benefit!

                     

                     

                    #2795
                    ek4
                    Participant

                      OK!  Making progress here – thank you!

                      Next:

                      1. Can you tell me how to “flatten my data” to output graphs for each column all at once?

                      2. Another question (which I should know, but don’t yet): how can I view or not view on a given plot a subset of the data (certain segments but not others), as shown below?

                      3. Trivial question: In my learning to make various Marker and Color schemes (and who knows what else I was doing), I made a bunch of empty stuff that is cluttering up the left hand side of the display (see all the empty boxes on the image ).  Any way to get rid of them?

                      screen

                      #2809
                      dgteam
                      Moderator

                        Great! See if this helps …

                        1 – Flatten data

                        We added a new help article to demonstrate: How to Flatten Data.

                        Since this will change the data, you might want to try with a copy of your file first. Once you do this you can slice and dice the data along segments or categories.  The program is also highly optimized for millions of rows, so no problem making very long tables.

                        After you flatten your data columns, change the Y column in your command to the new ‘Values’ column that gets created when you flatten.

                        This will show all the categories in your graph.

                        Next, you will need to add a Mask, to show one category at a time.

                        For example, to create the mask on a command group …

                        Step 1: Set Shared Mask to the column ‘Category’

                        Step 2: Set Include if value, select ‘Text Is’

                        Step 3:  Select ‘Create Text Menu’

                        That will create a Text menu variable, with a drop-down menu that you can use to toggle the category on the graph.

                        Below, you can see the mask after it is created at the group level (in the red box). To output a graph with every possible option, use the gear menu (red arrow) on the Text menu and select Export current figure for all …

                        BatchExport

                        2 – Selecting subsets will also require masks and you can add multiple masks to the same graph.

                        3 – Not trivial at all – good to keep your work free of unneeded entries – To remove, highlight any entry and hit the delete key.  You can also use command-z to undo if you delete anything accidentally.

                        If you need further help, let us know!

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

                      DataGraph Forums Technical Support Support Desk quick way to change Y axis on existing (complicated) plot