How to make a line plot with multiple samples on it

DataGraph Forums Technical Support Support Desk How to make a line plot with multiple samples on it

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6663
    karen harpp
    Participant

      Hello

      This may be a relatively simple question, but I am still new to Datagraph. Could someone direct me how to make a multi-Screen Shot 2021-06-25 at 9.38.57 AMelement plot (see attached image)? It’s a line graph, but it has multiple sets of data plotted on it (not just one line, but often many samples). It’s plotted against atomic number, but instead of showing the number, we show the element name. So 57 is really La, 58 is really Ce, etc. So I need to be able to change the name along the x-axis from a number to a letter. My big challenge though is how to set up the data so that one can plot multiple samples on the same graph, as shown. Thanks!

       

      #6664
      dgteam
      Moderator

        Here is some made up data with the same element group you have shown.

        To quickly plot, you can select the number column and the same data columns first. To do that. hold down the Command key and click each column header.  This selects the entire column.

        LinesNew1

         

        Next, you can use the Plots command.  Select Command > Add Plots.  This makes a black and white graph, but you can click the gear menu on the command to pick from color schemes, or change the color of each line manually.

        (NOTE: You can also use multiple Plot commands by clicking the Plot command icon three times after selecting the data, but the Plots command has these built-in color suggestions that can be very useful for multiple lines.)

         

        LinesNew2

         

        Next expand the Axis settings and change the X tick mark setting to Labels.  This will give you two more options to specify the Label locations on the x axis, and the actual text, which here is the column “Symbol”.  It also may require less Padding between the data and the end of the axis. Here it looks better to change the 5%.

        LinesNew3

        Does this help?

         

        #6798
        scgc
        Participant

          Thanks for asking this question, Karen. I had been wondering about this.

          DGteam…is there a way to make this plot from a data table that has the samples in rows and the elements in columns? Since DG plots columns against other columns, this kind of data layout would generally be more convenient…but to make this kind of plot, I would have to paste and transpose the data into a new data table. Kind of inconvenient.

          I think Excel’s default when making a line graph is to read the data the way DG does, where all data in a single column ends up on the same line. But Excel has a “Switch Row/Column” button in the “Select Data” window, which allowed me to make this graph without copying, pasting, and transposing:

          Screen Shot 2021-07-26 at 3.53.04 PM

          If there is not a way to do this in Datagraph without transposing the data into rows=elements/columns=samples, is this a function that could be added?

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

        DataGraph Forums Technical Support Support Desk How to make a line plot with multiple samples on it