topic Re: two plots on one graph in Discussions
https://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3084#M3084
Malurus,<BR /><BR />Can you give us a bit on where you're getting stuck?<BR /><BR />You may have more luck with the Overlay plot platform, which lets you plot two y-variables with the same x variable.Wed, 16 Mar 2011 17:28:19 GMT2011-03-16T17:28:19Ztwo plots on one graph
https://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3083#M3083
Hi all - I'm new to JMP's graph builder. I'm sure this is easy but alas...<BR /><BR />I need to present two plots on one graph:<BR />1. bars with s.e. bars (mean long-term rainfall by month)<BR />2. line (no error bars) rainfall data from a single year, also by month<BR /><BR />So, same x and same y axes.<BR /><BR />Thanks in anticipation.Wed, 16 Mar 2011 05:37:41 GMThttps://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3083#M3083malurus2011-03-16T05:37:41ZRe: two plots on one graph
https://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3084#M3084
Malurus,<BR /><BR />Can you give us a bit on where you're getting stuck?<BR /><BR />You may have more luck with the Overlay plot platform, which lets you plot two y-variables with the same x variable.Wed, 16 Mar 2011 17:28:19 GMThttps://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3084#M30842011-03-16T17:28:19ZRe: two plots on one graph
https://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3085#M3085
Thanks Eugene,<BR />Here is the work flow (keeping the rainfall example going):<BR />1) drag month onto x<BR />2) drag long-term rainfall data on y<BR />3) right click points -> change to bar<BR />4) right click bar -> add -> error bars -> standard error<BR /><B>So far so good. But, this is where I get stuck:</B><BR />5) drag rainfall data from a single year (the one I want to be represented by a line) onto the y axis and it displays as a second bar series, (and also adds error bars of 0)<BR />6) if I right click on the second series -> bar -> change to line, both series get changed to line<BR />So my question is how do I change just one series to line (with no se bars), while keeping the other as bars (with se bars)?Thu, 17 Mar 2011 00:22:49 GMThttps://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3085#M3085malurus2011-03-17T00:22:49ZRe: two plots on one graph
https://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3086#M3086
<P>I cannot find a way to do it mannually but it seems to be possible via script. Try this (change to your own column names):</P>
<PRE><CODE class=" language-jsl">Graph Builder(
Variables( X( :Month ), Y( :MeanRainfall ), Y( :Rainfall, Position( 1 ) ) ),
Elements(
Bar(
X,
Y( 1 ),
Legend( 3 ),
Row order( 0 ),
Error Bars( "Standard Error" ),
Summary Statistic( "Mean" )
),
Line(
X,
Y( 2 ),
Legend( 3 ),
Row order( 0 ),
Error Bars( "Standard Error" ),
Summary Statistic( "Mean" )
)
)
);</CODE></PRE>Mon, 13 Aug 2018 17:39:43 GMThttps://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3086#M3086ms2018-08-13T17:39:43ZRe: two plots on one graph
https://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3087#M3087
Thanks MS - I appreciate your suggestion.<BR /><BR />I tried using your script after altering the column names and couldn't get it to work. But I'm not good with scripts, nor do I have the time to learn how to work with them - if I did I'd be using R!<BR /><BR />I'm surprised JMP can't do this - it's not a complicated request and it's fairly routine for programmes like Sigmaplot.<BR /><BR />C'mon JMP people! I've got 23 days left on my eval licence and things don't look good for you right now if I have to resort to learning how to use scripts.Fri, 18 Mar 2011 00:01:19 GMThttps://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3087#M3087malurus2011-03-18T00:01:19ZRe: two plots on one graph
https://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3088#M3088
Graph builder is a "quick and dirty" way to rapidly explore data graphically. Use the "Chart" platform if you want to make this combined plot manually.<BR /><BR />Enter Month and your two Y variables, and make sure "Overlay" is checked and also check "Add error bars to mean". In the legend of the resulting graph, right-click on one variable and change to "Line chart".<BR /><BR />And, btw, the scripting in JMP is what sets it apart. You don't have to learn much actual scripting (like in R). Most of the things you do manually can be saved as a script for repeated use. Yet, JMP scripting, can be very powerful.<BR /><BR />But if it's just neat graphs you are looking for, JMP may not be for you.Fri, 18 Mar 2011 10:04:08 GMThttps://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/3088#M3088ms2011-03-18T10:04:08ZRe: two plots on one graph
https://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/254680#M50004
<P>Hi Malurus,</P>
<P>You are on the right track here. Once you add the two variables to the y-axis, the trick is to use both the Bar and Line graphing elements. (drag and drop the 2nd element onto graph)</P>
<P> </P>
<P>From there, modify which variable (current or historical rainfall) applies to which graphing element. To do this:</P>
<P>From lefthand panel, expand the Variables menu</P>
<P>Select historical for the Line element</P>
<P>Select current for the Bar element</P>
<P>You can also add the SE bars for the Bar element via this panel </P>
<P> </P>
<P>You should end up with something like the image below (lefthand panel items indicated in red):</P>
<P> </P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-03-27 at 1.52.07 PM.png" style="width: 400px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/22589i1A7441A2908AE975/image-size/medium?v=1.0&px=400" title="Screen Shot 2020-03-27 at 1.52.07 PM.png" alt="Screen Shot 2020-03-27 at 1.52.07 PM.png" /></span></P>Fri, 27 Mar 2020 20:59:27 GMThttps://community.jmp.com/t5/Discussions/two-plots-on-one-graph/m-p/254680#M50004Jeff_Upton2020-03-27T20:59:27Z