Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- two plots on one graph

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

two plots on one graph

Mar 15, 2011 10:37 PM
(4390 views)

Hi all - I'm new to JMP's graph builder. I'm sure this is easy but alas...

I need to present two plots on one graph:

1. bars with s.e. bars (mean long-term rainfall by month)

2. line (no error bars) rainfall data from a single year, also by month

So, same x and same y axes.

Thanks in anticipation.

I need to present two plots on one graph:

1. bars with s.e. bars (mean long-term rainfall by month)

2. line (no error bars) rainfall data from a single year, also by month

So, same x and same y axes.

Thanks in anticipation.

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: two plots on one graph

Malurus,

Can you give us a bit on where you're getting stuck?

You may have more luck with the Overlay plot platform, which lets you plot two y-variables with the same x variable.

Can you give us a bit on where you're getting stuck?

You may have more luck with the Overlay plot platform, which lets you plot two y-variables with the same x variable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: two plots on one graph

Thanks Eugene,

Here is the work flow (keeping the rainfall example going):

1) drag month onto x

2) drag long-term rainfall data on y

3) right click points -> change to bar

4) right click bar -> add -> error bars -> standard error

**So far so good. But, this is where I get stuck:**

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)

6) if I right click on the second series -> bar -> change to line, both series get changed to line

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)?

Here is the work flow (keeping the rainfall example going):

1) drag month onto x

2) drag long-term rainfall data on y

3) right click points -> change to bar

4) right click bar -> add -> error bars -> standard error

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)

6) if I right click on the second series -> bar -> change to line, both series get changed to line

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)?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: two plots on one graph

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):

```
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" )
)
)
);
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: two plots on one graph

Thanks MS - I appreciate your suggestion.

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!

I'm surprised JMP can't do this - it's not a complicated request and it's fairly routine for programmes like Sigmaplot.

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.

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!

I'm surprised JMP can't do this - it's not a complicated request and it's fairly routine for programmes like Sigmaplot.

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: two plots on one graph

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.

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".

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.

But if it's just neat graphs you are looking for, JMP may not be for you.

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".

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.

But if it's just neat graphs you are looking for, JMP may not be for you.