Choose Language Hide Translation Bar
scwise
Staff

Pictures from the Gallery 5: Select Advanced Graph Builder Views (2020-US-45MP-533)

Level: Beginner

 

Scott Wise, Senior Manager, JMP Education Team, SAS

 

A picture is said to be worth a thousand words, and the visuals that can be created in JMP Graph Builder can be considered fine works of art in their ability to convey compelling information to the viewer. This journal presentation features how to build popular and captivating advanced graph views using JMP Graph Builder. Based on the popular Pictures from the Gallery journals, the Gallery 5 presentation and journal features new views available in the latest versions of JMP. We will feature several popular industry graph formats that you may not have known could be easily built within JMP. Views such as incorporating Ridgeline & Plots, Contour Bag Plots, Informative Box Plots and more will be included that can help breathe life into your graphs and provide a compelling platform to help manage up your results.

 

 

Auto-generated transcript...

 


Speaker

Transcript

Greetings and welcome to pictures from the Gallery Five More Advanced Graph Builder Views. In past presentations many weird things have occurred, like being interrupted by visits from aliens. We apologize and we will show a more serious graph demo to start our presentation.
  Let's use graph builder to answer the question, what country has the tallest buildings. To do this we'll use wooden blocks that represent every 150 meters of structural height. On the back of each block is a barcode that we can use to directly scan info into JMP.
  By physically using the blocks, we now have a physical scale model.
  This automatically populated the data in JMP and generated a bar graph in descending order.
  Wait, do you hear that?
  Okay, Godzilla. Would you rather we showed a graph about you?
  So let's do that.
Scott Wise Welcome, everybody. Welcome to pictures from the gallery. My name is Scott Wise and hopefully you enjoyed that little video. And our whole idea is to show you some advanced things in Graph Builder you probably didn't know you could automatically do.
  So we're going to show you some smarter things we can do, maybe more compelling ways we can show Godzilla's story. And there was an article that came out and it had an alarming trend on it. It said, since when Godzilla began about in 1954,
  he has grown bigger and bigger and bigger.
  On...to the point he's much larger than he used to be.
  That's pretty disconcerting. He's pretty destructive from the very start. So we'd like to show this. And of course, we've got to get the data into JMP; that was fairly easy to do.
  So here's the data into JMP. We have the meters high. So he's...we see he's grown from 50 meters high, all the way to 150 meters high in his last picture which was in 2019.
  Now, a couple of things we can do. This has been an option in JMP for quite a while, but you might not have seen it before. You can put pictures into JMP.
  And if I add a column here, you can see it's got this empty with the brackets. And if I go to the column info, this is a expression data type.
  And pictures is one of the things it can take. And so if I go and I take a look at
  just any picture, and I've got, I've got these as kind of separate pictures here in my PowerPoint. All I have to do is grab it,
  drop it directly into my JMP table and it will size. So that's pretty cool. And you can as well,
  label this column so it'll show up when I hover over points in my graphs. So I'm going to delete that row, but here's those pictures I have.
  OK, now let's go back to our data. Let's take a look at just building out a simple bar chart. I'm just going to put meters high on the Y. I'll put the year on the X. I'll ask for bars up here from the bar element.
  Now this doesn't have the same view I had before. There's a lot of space in between these bars. If you want to change them, right click into the bar area. Go to customize.
  Click on bar and on the width proportion, type in like a .99 or something below one here and you can see that filled out the space and there's not a lot of open gap in between them. So this is pretty cool. And so I have this information.
  This has given me the relative height of Godzilla over those...over the years of making movies. And of course if you hover over them, of course, the
  beside the label turned on, the picture will show up. But what if I wanted to make the picture be the bar? Is there a way to do that? Yes, there is. So I copied this bar chart into my PowerPoint presentation.
  And kind of use it as a template. And then I said, Well, gee, can I just take the pictures and using that JMP bar chart as a template, can I kind of get them into the right size on the same size scale? And yes, you can. You can see here I just massaged it in the place.
  So I got them all just kind of oriented into place.
  And then, of course, were able to take a...we were able to use that as a group picture. So now I have a relatively scaled group picture.
  So this was very useful because what I can do
  is if I come back
  into JMP.
  Let's bring back up my Graph Builder.
  And I just take this grouping.
  I can put it into my graph.
  It just kind of snaps right in there.
  Then you can work on positioning it, get it into the right format. And of course, if you go and you make this transparent, really large,
  that really helps.
  You can build it out and shrink the graph and get it down to the right size. So it takes a little bit of finagling to do, but the result is
  you then can match that size graph. Now another graph I'd like to make are bar and needle charts.
  So I kind of like these, you can...you can make the circle kind of stand out. You can even size something by the circle, kind of like it...like pins, right, the top of a pen. And then you've got, you know, a long...
  a long line there, kind of connected it to the label. So that's, that's kind of a nice view.
  So that's very easy to do within JMP. If I go back, go ahead, put meters high, put year, go to bar, but this time under bar style, select needle.
  And maybe I will also add some points and, of course, I can make the size be the meters high.
  And I can as well give it some color. Maybe I'll color it by the...where...where Godzilla attacked. And if I want to make the circles show more representation
  I can right click on this marker size there, where it showed me that meters high is the size of the circle, maybe increase that to something like 12. Now I get a much more separation from 1954 and 2019.
  And again, the pictures will surface.
  And you can even stop there. I went a little further.
  I created this chart. And on this chart,
  on the axis settings, I put in a reference line by where the maximum depth of the respective target harbors were.
  And why we did this was, I saw a funny article where they were given a hypothetical to the to the emergency coordinator of New York City.
  This is not long after Godzilla had visited there. And so very dinosaurish looking Godzilla in 1998.
  And he said if Godzilla ever comes back, "Are you worried? Are you prepared?", and he said, "No problem. We'll evacuate the city, very quickly." And he said, "why is that?" And he says, "Well, gee, the actual
  you know, maximum depth of New York Harbor is only so big here and Godzilla is way up here. So we'll see him coming along way out before he ever hits land." So I thought that was
  pretty amusing. Of course you can combine these charts. We can do just what we did and put that scaled picture, scaled bar chart in with the needle chart so I can have, you know, a lot of information here, including the harbor depth to targets. And now of course see in the picture of Godzilla.
  All right, so hopefully you enjoyed that, uh, that little demonstration here. And that's really what
  this whole presentations about. We call this Pictures from the Gallery and we're challenged every year to come up with a handful of advanced views that maybe folks had done
  with a lot of pain and in spreadsheets and other packages, or really challenged JMP to be able to create.
  And JMP is so flexible and so interactive that there's a lot of great views you can get that can make your data even more compelling.
  And so here, without further ado, are the version of pictures from the gallery for this year. We're on our fifth edition and we got six beautiful views here.
  Number one is a informative box plot.
  Number two is a ridge plot density chart. Number three is actually
  having multiple ranges as an area range plot in between, on my lines.
  Number four is an informative points plot. It's kind of unique view to look at points and size points.
  Now on number five is a box plot with outlier boxes.
  Not box plot, excuse me, bag plot with outlier boxes so bag plot is a new functionality.
  A two dimensional way of seeing outliers and I even included some outlier boxes on the edges. And number six is a components effects plot,
  and it helps you when you have mixture components that have to add up to 100%, it helps you figure out a way of showing them on a graph where you can look at your mixture settings and see how they respond to an output.
  Maybe something you try to experiment on or model. So that's very handy.
  So these are the six views. Now, we probably don't have time to go through all six, if I'm usually doing this presentation live I might take a vote, but I can tell you, I've got a pretty good idea from doing this before that
  I'm going to show you the most popular views first. And whatever we don't cover, I'll be glad to cover
  later for you. I'm going to leave you behind with instructions in the script to generate it yourself.
  So that's the beauty of this is you're going to get gift from us. This gift is going to be this pictures from the gallery journal that you can always go back to and use when you want to replicate one of these views or practice.
  the ridgeline plot. This was a new view in JMP 15
  and it is showing you a lot of stacked histograms over on top of each other, against kind of a bunch of categorical levels
  on my y axis. And it's very useful, especially if you're like...you're plotting signal data or growth data and you want to look at it in comparison to a reference. So this was some
  real medical data and we have this DMSO drug and they wanted to, they had the...
  they had some measure of of area where they took the log of that measure and I want to find how things are the same or different than my reference, my red
  distribution. So let me show you how we set this up. So again you have good information in your journal, right, tips on how to make it. We're going to use that data and we're going to use a kernel density in a bunch of ordering commands.
  And now, here are the steps we're going to follow to make this view. So you can go through and see these yourself. Always attached is the data and always attached is the finished script. So we're going to try to generate this chart. So let me start from scratch.
  So I'm going to put the drug on the Y axis. I'm going to put the area log
  on the X axis and it gives me box plots and that's fine. Now something I'll do, I'll take this DMSO
  and I'm going to put it in the overlay. That's kind of setting up my red, blue, you know, this is my reference. This is things I'm comparing it to.
  Now before we begin, anything you have in the chart can help you order things in your Graph Builder. And if I go over the Y axis, I right click, I can order by and I can order by the area log10 descending.
  So I do that and it orders by something. What is it order by? If I right click on there, now that I've activated the order by, now it shows me all the statistics. It defaults to the mean.
  I have a feeling, median, because not all these are normal, some of them have quite long tails, I might do the median here. And does that change things? A little bit.
  So now it is ordering from top to bottom according to the median. And you can kind of tell that with the median lines there, 50% quintiles of these box plots.
  But I don't want box plots. I want bar. So, all I have to do is come up here and click on the bar icon.
  Now we're looking pretty good, but how do I get those smooth lines and how do I get into overlay? All you have to do under histogram style, down here in the little control panel for histograms, select kernel density.
  And you get two smoothers, you get an overlap and you get a smoothness. The smoothness controls how bumpy, you want to earn smooth, you want to make these lines and I like him just slightly bumpy.
  And now the overlaps controlling how much the overlap with the next level and you can give it a little...give it a lot of overlap. Give it a little overlap. Whatever makes the most sense.
  And that's it. And so what you can additionally add some reference lines, you know, by right click and go to access setting and add some reference lines down here to help your view.
  If I go to the one in our script, you can see I've added for the DMSO, I've added where it's median is and where it's min and max are.
  And you can kind of get an idea which ones are very similar in center, which ones are similar in shape, which ones are very different from each other. So that's the ridgeplot density.
  So again, we'll give you this journal so you can replicate it.
  And let's move on to the next view, the next view we're going to look at, that's the probably the second most popular out of all these is the bag plot with outlier boxes. So the bag plot is a new kind of
  of chart that gives you a two dimensional view.
  So I've got (this is pollution data) so I've got ozone on my Y and I've got particulates (PM10s)
  on my x axis.
  So now I've got this bag plot here.
  that's going to allow me, it's going to...it's going to find a center and that's this little asterisk, little hard to see. I'll make it a little bigger when we do this. But
  that little asterisk there is really the center of the two dimensional space in between ozone and PM10.
  And it's drawing some fences, draws and...draws a little...
  little area closest to the to that two dimensional grouping and then it draws a fence outside and it says, if any point falls beyond the fence, like this point right here,
  it is truly an outlier in a two dimensional fence, in respect to both PM10 and ozone and that's kind of cool. And what I did was on the edges, I put in some box plots.
  Because I wanted to see if on a one dimensional standpoint, I just looked at PM10 what would have been out?
  Well, this point right here, which was St. Louis, which was not outside the bag plot fence, but it was outside for PM10.
  But why it's not outside the bag plot fence is it's almost on the median of ozone. It's right in there.
  Right but Los Angeles would have been out for ozone, but it is not out for PM10. So I thought that was really interesting view. So let's see how we can do that. So again, I've got these Graph Builder steps. We are going to be using contour plots.
  to help us do this and we're going to be using a bag plot in the contour plot and a dummy variable.
  So let me pull up the pollutants map.
  Here we go.
  Alright, so I've got my PM10.
  I've got my ozone.
  I've got my city, of course.
  Now I've got a dummy variable. And it really is a dummy variable. You see, all I have in here are x's. So, a whole bunch of x's. Just something...something categorical but repeating that
  can be used to open a new section of your Graph Builder. So this is a trick that shows up a lot in pictures from the gallery.
  So we're going to take my ozone on the Y, we'll take my PM10 on the X. I'll turn off that smoother line, but I'm going to add in the contour plot up here from the...from those graph elements.
  Now here if I look at the elements for contour, here's where I can do the bag plot.
  Now this sets up that bag plot here, which is pretty cool.
  I think I'll color this one purple, just so I can just point out, that's where the middle of the two dimensional space is.
  And that's very cool. We can see that point fallen out there, which was Los Angeles. That's well away. Now what if I want to throw those on box plots in as well.
  Well, I'm going to take my dummy variable. I'm just going to drag it right down here to like almost the start of the leftmost X axis, then it tries to do something with it says, Oh, you got a category. It's x. Well I can right click in here and I can change that to a box plot.
  And I'm going to do the same thing on the very top of the y axis, come right in here and change it.
  Just right clicked in here. It's all I'm doing. From points, change that to box plot. There it is. There we go.
  This section in here doesn't really mean anything. So I'm going to right click and I don't want a box plot in this little top square; I want nothing, so I just removed it.
  Now to size these a little better, what I'm going to do, I'm going to hover over the dummy label. I'm going to pull all the way down to I kind of get that little diagonal, you know, line, and then I...this lets me move the width. There's the width, I can move here. And I can do the same thing
  on the x axis and make it look a little prettier.
  Which is kind of cool.
  And of course we can come in here. We can we can take...we don't have to use the word "dummy" in here. You might not want dummy in a smart graph, we can take the label out
  by double clicking on that axis and taking out the label and just making it kind of ghosting it over there. And now I've got my box plot. And now I've got, as well, my bag plot all in one.
  And this is another good one to do reference lines. I've showed you how to do reference lines earlier. But here you see I drew in some reference lines.
  And there's hover help as well if you've got things you can label here and I think we did put a label on city.
  And of course, we get ozone and PM10 because they're in the graph. You can pin these and you see I pin St. Louis, and I pin Los Angeles. They can be moved all over the place.
  But I drew some lines and dashed lines. And so I can make my points, you know, basically, that, you know, Los Angeles is truly an outlier in two dimensional space, where St. Louis is only outlier in respect to PM10.
  So that is how we do a bag plot with outlier boxes.
  And again, as we go through this presentation, feel free to lose...let's see, leave a Q&A in the chat and we'll get back with you and glad to reproduce some of these views for you or answer any questions. Usually generates a lot of other ideas on graphs that maybe you've been itching to make.
  Alright, so the next one we're going to take a look at is number six. This is the components effects plot. As I mentioned, when I was going through the
  pictures from the gallery, this one is dealing with mixtures and I have a whole bunch of diluents. They are all in just...just for example, they're all in the same vat.
  And this is a vat of solutions, chemicals and I can't have any of them add up over 100%. And so there's mixture designs and mixture modeling that helps you make sure you put the constraint in there that no one
  ingredient in there, so that when they add up, they all have to add to 100%. So that's kind of why you're seeing that if all five of them here are only 20%
  of the amount that would add 100%. So these are just...so this is showing you something that was very difficult to do. It was easy to do this type of analysis in JMP but it was hard to graph and show
  exactly how they... how the different settings, the different ratios of the mixture here actually are affecting the output, in this case total hardness.
  And this is a beautiful chart and it's making use of smoother lines to really help us. So what we're going to do, we're going to look at some stack data.
  And I do want to point out that
  there's a great book if you're dealing with formulations and things like mixtures, that are Ron Snee and Roger Hoerl have a book called "Strategies for Formulation Development."
  They do use JMP to do this. And this is an example of the ABDC, actually ABCD mixture screening design. So this is some results that came out of a mixture screening experiments. So this is pretty good. I got my tablet hardness. I've got my different diluent amounts that I have.
  So what we're going to do is just go to Graph Builder. Got that set up, I'll put my tablet hardness here, put my diluent amount here. Now they did take multiple measures here so I'm
  I'm not surprised to see what's going on. And there's several points. But what I'm going to do is I'm going to overlay
  by the diluents
  and the summary statistic we're going to use. Let's just use the mean.
  Okay, now here's the beauty of the smoother. You have a smoother control box here in the smoother element, and you can play with the amount of straightness in curve.
  And I'm going to pull it down until they agree. And what I was looking at, I was really focusing on 20% because it makes sense to me that all five of these will have to add up to 50%.
  It's something I probably haven't shown before. My eyes...I really love grid lines. You can turn these on when you double click on the axis.
  There we go, can just turn on grid lines here and that really helps my eyes. But now, if you can see something as this...the results of this experiment showing something like cornstarch where immediately
  when, when it was low didn't make much of a difference. Not many of them made much of a difference when they were low in concentration in terms of
  how much they made up of the vat. Here you can see the more we put, the more tablet hardness went down and we can see something like, man, it's all...
  ...went up.
  So that is a cool graph and probably something that problably didn't see we can do but it's actually quite easy to do within JMP.
  All right, I'm checking our time, we are doing pretty good. So I will keep going until we are out of time. I will go with the next most popular view. The next most popular view
  was these informative point plots. So this is jittering of points, but it's making a nice kind of cluster of them and it kind of makes this kind of pack circular grid.
  And you see we've even got it...got this one sized by cardbs and colored by calories. So this is a bunch of beer, so I...
  this year I went on a pretty extreme diet, I did real well with it. One of the things I had to do was pay attention to the kind of beer I was drinking,
  couldn't drink the really the really high calorie or a high carb stouts and porters that I usually do. So did change what I was drinking, but I would love to make this type of chart against some of my favorite breweries, so I can find new things to drink.
  So, pretty easy to do.
  What we're going to do is we're going to go down here to beer calories.
  Right now I'm going to put the brewery on the x axis, calories on the, um,
  and then, and then the color and size.
  So it's a little bit of a different graph and we're not going to mess with the y axis. So I got brewery down here. It's got a bunch of points in there. Now let's go ahead
  and
  go ahead and size
  by the amount of carbs and color by the
  calories.
  And maybe I'll do them all per ounce. Maybe that's a fair way of showing it. So here's one version of the graph that we have.
  Now,
  this looks pretty interesting. But you might be wondering what's going on, what's, what exactly is going on with
  not having that grouping. They're all kind of sin line. They're slightly jittered.
  Well, if I go to my local data filter, let's size down. Let's just not look at all the breweries, let's just take a look at some of the top ones. So here's...
  I asked for, again, just under that hotspot. This was asking under for a local data filter down here at the bottom.
  And then this red triangle, it'll let me order by count, find the biggest ones. Now just find the biggest four. Now ou're seeing the grouping. In fact I'll click in here and add a grid line.
  to make that easy to see. And now I can see, you know, Sierra Nevada has got
  you know, a really high calorie in a really big carb Bigfoot, which is really delicious beer. Okay, but I can see there's something else, much smaller like Anheuser Busch has the Budweiser Select 55 which
  says no carbs or very little carbs per ounce. You know, there's and then just 4.6 calories per ounce, you know, but something something below on something close to zero.
  So that's pretty cool to view. Now if I add too many of these I lose it, you're like, "Well, Scott, how do I get that back?"
  Don't fear. Of course you can always size down your list. You can also make your graph bigger, but under points there is a jitter limit. And if I increase that jimmer...jitter limit to two, you can see it's going to allow you to
  take a little more space to create these jitters. Now you can see what you want. Now you can get a smaller subset and get just the view you like.
  All right, so hopefully you enjoyed that one. That's one of my favorites.
  Alright, so the next one we're gonna take a look at. Let's take a look at informative box plot. This is a quick one. This is a another new one in JMP 15 so the box plots the bag plots and as well...the...
  the...this box plots,
  this bag plot, as well as the ridge plot, these are the ones that were new to 15, had new functionality in 15. So this is a different kind of style,
  which is kind of cool
  that you get that kind of view on there. Plus, I'm able to color these box plots, because they're solid. Now I can give them a color. And here I colored them by a process capability measurement. So this gives you another chance to make your box plot stand out, which is kind of cool.
  So what we're gonna do is we're gonna look at this fan supplier stack. This is a bunch of fans suppliers, looking at their revolutions per minute.
  I'm going to go in the Graph Builder. I am going to put the fan supplier on the x, but the fan RPM on the Y, ask for box plots. Pretty easy. Now what we're going to do now is under the style, I'm going to say, give me solid.
  Okay, and that's a brand new style. There's also a thin style, in case you'd like that one. I like this solid style because with the solid style, ow I can take something like Cpk, and I can color by it.
  And that's what we did here. And if I right click here right on the gradient, click on that gradient, maybe I will choose a green to white to red, kind of a
  go-stop kind of situation. I'll reverse them to make sure that makes sense. And now I can see the things with the worst capability are indeed getting out
  beyond my upper spec limit. Those things with higher Cpk, higher capability. are a lot more closer to being centered and closer to my target, not spread out all that much.
  So that's a pretty cool view, pretty easy to use.
  Alright, so we actually got time to run through the last one, which is fantastic. So the last one we're going to look at
  is this area range chart. This is not just the lines. Everybody knows how to do lines and kind of do a trend chart. But you can see I've got area shaded in here between the lines.
  What we were doing in this one, I did this chart with Bill Worley, we got a good blog on it as well. We were looking at some different
  ages at which you can start to pull your US social security and you can take it early at 62, you can take it next at 68 and 8 months, and you can take it...you can wait all the way til you're 70 and there'll be higher payouts each year.
  So if I take it a 62, I get a lower pay out. But of course, I start earlier. So we wanted a good chart that kind of shows you the trade offs.
Comments
Bass_Masri

Very interesting - Thanks Scott