Stacked Histogram

DataGraph Forums Technical Support Support Desk Stacked Histogram

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5883
    jonathan chriest
    Participant

      Hi! I have a histogram I’ve made based on 3 separate imported CSV files. Rather than display the bars over each other like the first image, I’d like to stack them like the second image. The first image is my current histogram. The second is what I want to do with this data using the histogram function rather than the bar graph function. I was able to use the bar graph function for the second since the data was much simpler with fewer necessary bins.

      JonathanScreen Shot 2021-02-11 at 20.09.23

      Lightning Stroke Distribution

      #5884
      dgteam
      Moderator

        Hello Jonathan!

        The best way to do this is by using the Pivot command.

        To use this command you will have append your values into one column with a corresponding category column.  Another term for this is data flattening. There is a built-in action for flattening columns of data that will create a category column automatically: How to flatten data

        Once appended or flattened, the values are then in one and another column with a category.

        HistStacked

        If you set up the appended data with the value column on the left and the category on the right (as shown above), then here are the steps ..

        1. Highlight the two columns and Click the Pivot command shortcut.
        2. Change the Type to ‘X Stacked’
        3. Uncheck Categories (changes the x-axis to a numerical scale)
        4. Change Map rows to specify the bin type and a smaller bin size.

        HistStacked2

        Does this help?

        #6016
        jonathan chriest
        Participant

          Hi! I am sorry, I thought I had posted a reply a couple weeks ago. This method came close to giving me what I wanted, however when I flattened my data, the values changed to be incorrect. I have 3 groups of data. Each of the groups has a number of columns. I am hoping to stack data in 3 bars as you have shown above, with a column selected from each of the 3 groups. Do you have any further advice? Below is the plot that resulted from flattening and following the next 4 steps. Thank you!

          TananaValleyWestError

        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 Stacked Histogram