Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
nqueiss
Level II

Stacked Bar Graph Bar Width

Hello,

I am having issues increasing the size of the bars in my stacked bar graph. I would just like the bars to be a little wider for better visibility. I am plotting the data (see attached screen shot) by week for the year 2019. I am assuming that my bars are as thin as they are because I am trying to graph 8 different variables for each week but since some are blank and the graph is "stacked" I would assume there is  some sort of work-around for this. Thanks in advance.

 

Data.PNGGraph.PNG

 

 

 

 

 

 

 

 

 

 

 

 

6 REPLIES 6
Highlighted

Re: Stacked Bar Graph Bar Width

Right-click on one of the bars and select Customize. Select the Bar item and you should see an option called Width Proportion. The default value 0 tells JMP to size the bars automatically but you can change the value to adjust the width to your liking.

Learn it once, use it forever!
Highlighted
nqueiss
Level II

Re: Stacked Bar Graph Bar Width

Thank you for your response. However, I have tried this to no avail. This is what it looks like when I right-click and choose "customize". I have toyed with a lot of the right-click options also with no success.

Capture.PNG

 

Highlighted

Re: Stacked Bar Graph Bar Width

I see this dialog with JMP 15:

 

Capture.JPG

 

What version of JMP are you using?

Learn it once, use it forever!
Highlighted
nqueiss
Level II

Re: Stacked Bar Graph Bar Width

Ah. I am using 12.1. I guess I should have specified. Any idea how to do this on my version? If I select the "needle" bar style, the bars become more appropriate in size but some data is overlapped and not visible.

 

Capture.PNG

Highlighted

Re: Stacked Bar Graph Bar Width

I think the problem is that there are 365 days being displayed along the x-axis. So the space is divided by 365 and then each bar takes up about 1/2 of that space. That makes for some pretty small bars. Even if you did change the width proportion to 1, it wouldn't/doesn't make much difference.

Your data is pretty sparse so there is a lot of empty space between the thin bars that are drawn which makes it appear as though the bars could be bigger. However, the bars can't really get any bigger because they are constrained by the amount of space available per day.

 

I didn't have your original data, but I manufactured something similar.

paul_vezzetti_0-1579897596856.png

 

To utilize all of the available space, I got rid of the rows which contained all missing values. I did this using a row selection and then subsetting the data table. You could also exclude the points. Here is my example from Rows->Row Selection->Select Where...

 

paul_vezzetti_1-1579897799157.png

After the rows with any non-missing value were selected, I went to Table->Subset and did a subset by selected rows.

Finally, I created a copy of the Date column which was Character type and Ordinal and had a column formula: Format(:Date)

I then plotted my new date string column against my measures to get something like this:

paul_vezzetti_2-1579897983628.png

Since I only had 78 days with non-missing data compared to the full 365 days, there is more room along the axis for each bar. The disadvantage is that I lose the date characteristics of my data. Jan 9 is right next to Jan22 which is right next to Jan27 rather than being spaced out linearly along the axis. The advantage is that you only see the dates which have some data and the bars are readable.

 

Of course, in the first example, I could have achieved more readable bars by simply zooming on the x-axis into the areas of the year that I'm interested in. For example:

 

paul_vezzetti_3-1579898261433.png

 

 

 

 

 

 

Highlighted
nqueiss
Level II

Re: Stacked Bar Graph Bar Width

Thank you @markbailey and @paul_vezzetti for your help. Paul, you were right about the x-axis being too crowded. I am trying to plot my data per week so I consolidated the data into one day per week and got  rid of the rest leaving only 52 entries on the x-axis instead of 365 and that took care of it. Thanks again!
Weekly Plotted.PNG

Article Labels

    There are no labels assigned to this post.