How to modify graph's 300+ individual series along with median & 95%CI?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

How to modify graph's 300+ individual series along with median & 95%CI?

Trenton Lum
Hello all~!

I'm a new researcher and was hoping someone experienced with graphs could offer some advice.

I'm trying to copy the following graph:

https://postimg.org/image/ovuzkbhdp/
e_GFR_graph.jpg

But in excel each series must be modified individually! (line thickness, pattern, color, etc)
I have over 300 series and it'd be horribly difficult to modify each series one-by-one.

Similar to the graph, I'd also like to superimpose the median and 95%CIs of 2 groups on my graph.

Any help would be fantastically appreciated!

Sincerely,
Trent
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Bruce Weaver
Administrator
Trent posted this question to ResearchGate a week or two ago, and I suggested he might have better luck here, because I thought Andy or ViAnn would be all over it!  Any ideas you two, or anyone else?  


Trenton Lum wrote
Hello all~!

I'm a new researcher and was hoping someone experienced with graphs could offer some advice.

I'm trying to copy the following graph:

https://postimg.org/image/ovuzkbhdp/
e_GFR_graph.jpg

But in excel each series must be modified individually! (line thickness, pattern, color, etc)
I have over 300 series and it'd be horribly difficult to modify each series one-by-one.

Similar to the graph, I'd also like to superimpose the median and 95%CIs of 2 groups on my graph.

Any help would be fantastically appreciated!

Sincerely,
Trent
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Jon Peck
Many of the properties of the objects in the graph can be set in GPL code, but the easiest way to get the desired look is first to create one basic graph via the Chart Builder.  Then open it in the Chart Editor and set the display properties such as color, line thickness, etc as desired.  Then save it as a template (File > Save Chart Template) selecting the appropriate properties.  Then for producing similar charts, use this template from the Chart Builder (paste the syntax), and those properties will be applied to the new charts.

On Thu, Sep 8, 2016 at 7:48 PM, Bruce Weaver <[hidden email]> wrote:
Trent posted this question to ResearchGate a week or two ago, and I suggested
he might have better luck here, because I thought Andy or ViAnn would be all
over it!  Any ideas you two, or anyone else?



Trenton Lum wrote
> Hello all~!
>
> I'm a new researcher and was hoping someone experienced with graphs could
> offer some advice.
>
> I'm trying to copy the following graph:
>
> https://postimg.org/image/ovuzkbhdp/
> e_GFR_graph.jpg
> <http://spssx-discussion.1045642.n5.nabble.com/file/n5733052/e_GFR_graph.jpg>
>
> But in excel each series must be modified individually! (line thickness,
> pattern, color, etc)
> I have over 300 series and it'd be horribly difficult to modify each
> series one-by-one.
>
> Similar to the graph, I'd also like to superimpose the median and 95%CIs
> of 2 groups on my graph.
>
> Any help would be fantastically appreciated!
>
> Sincerely,
> Trent





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/How-to-modify-graph-s-300-individual-series-along-with-median-95-CI-tp5733052p5733094.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Andy W
In reply to this post by Bruce Weaver
Well geez, others can answer graph questions if they want :) Here is an example, I wrote a blog post about a similar topic recently, https://andrewpwheeler.wordpress.com/2016/08/12/plotting-panel-data-with-many-lines-in-spss/.

******************************************************************************************.
SET SEED 10.
INPUT PROGRAM.
LOOP #i = 1 TO 300.
  COMPUTE #G = RV.BERNOULLI(0.5).
  LOOP #M = 1 TO 36.
    COMPUTE Group = #G.
           COMPUTE Month = #M.
           COMPUTE IndividualId = #i.
    END CASE.
  END LOOP.
END LOOP.
END FILE.
END INPUT PROGRAM.
DATASET NAME Lines.

DO IF Group = 1.
  COMPUTE Y = 40 + 0.5*Month + 0.1*(Month**2) + RV.NORMAL(0,4).
ELSE.
  COMPUTE Y = 30 + 2*Month - 0.04*(Month**2) + RV.NORMAL(0,10).
END IF.
EXECUTE.
FORMATS Group (F1.0) Month (F2.0) Y (F3.0) IndividualId (F3.0).
VALUE LABELS Group 0 'A' 1 'B'.

*Now the graph.
GGRAPH
  /GRAPHDATASET DATASET=Lines NAME="Aggre" VARIABLES=Month Group MEDIANCI(Y,95)[NAME="MedianY" HIGH="HighCI" LOW="LowCI"]
  /GRAPHDATASET DATASET=Lines NAME="Micro" VARIABLES=Month Y IndividualId Group
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: M=userSource(id("Micro"))
  DATA: Month=col(source(M), name("Month"))
  DATA: Y=col(source(M), name("Y"))
  DATA: IndividualId=col(source(M), name("IndividualId"), unit.category())
  DATA: Group=col(source(M), name("Group"), unit.category())
  SOURCE: A=userSource(id("Aggre"))
  DATA: MonthA=col(source(A), name("Month"))
  DATA: GroupA=col(source(A), name("Group"), unit.category())  
  DATA: MedianY=col(source(A), name("MedianY"))
  DATA: LowCI=col(source(A), name("LowCI"))
  DATA: HighCI=col(source(A), name("HighCI"))
  GUIDE: axis(dim(1), label("Month"))
  GUIDE: axis(dim(2), label("Y"))
  GUIDE: axis(dim(3), opposite())
  ELEMENT: line(position(Month*Y), split(IndividualId), transparency(transparency."0.9"), color(Group))
  ELEMENT: line(position(MonthA*MedianY), color(GroupA), shape(shape.dash))
  ELEMENT: line(position(MonthA*HighCI), color(GroupA))  
  ELEMENT: line(position(MonthA*LowCI), color(GroupA))
END GPL.
******************************************************************************************.



I would actually suggest putting each group in its own panel, as real life data won't be so separated. But I am getting error messages when I do that with this data, https://dl.dropboxusercontent.com/u/3385251/Median_Lines.sps.

There would be workarounds not using a second GRAPHDATASET line. Note that the median are per X axis category, it is not a median for the entire curve (what you would need a model for).
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Bruce Weaver
Administrator
Yeah, sure.  And people can choose ground chuck over prime rib too.  ;-)


Andy W wrote
Well geez, others can answer graph questions if they want :)
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

David Marso
Administrator
Can I get a surf & turf. LOBSTER!

Bruce Weaver wrote
Yeah, sure.  And people can choose ground chuck over prime rib too.  ;-)


Andy W wrote
Well geez, others can answer graph questions if they want :)
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Trenton Lum
In reply to this post by Andy W
Thank you so very much Dr.s Weaver, Peck, and Andy W!

I was beginning to think that making such a graph would require Stata or R..
I'll try your suggestions and post back here on how it goes~~ :)
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Jon Peck
And Andy is a Dr too, now.

On Sat, Sep 10, 2016 at 6:20 AM, Trenton Lum <[hidden email]> wrote:
Thank you so very much Dr.s Weaver, Peck, and Andy W!

I was beginning to think that making such a graph would require Stata or R..
I'll try your suggestions and post back here on how it goes~~ :)



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/How-to-modify-graph-s-300-individual-series-along-with-median-95-CI-tp5733052p5733107.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Mike

They're not real doctors, they're Ph.D.s -- a Ph.D. has
to have been involved in psychiatric or medical research
with MD PIs to get the joke.
 
Here's another "joke":
 
"Ph.D.s are great!  Every MD should own at least one!"
I've been involved in too much psychiatric research.
 
-Mike Palij, Ph.D.
New York University
 
----- Original Message -----
Sent: Saturday, September 10, 2016 9:07 AM
Subject: Re: How to modify graph's 300+ individual series along with median & 95%CI?

And Andy is a Dr too, now.

On Sat, Sep 10, 2016 at 6:20 AM, Trenton Lum <[hidden email]> wrote:
Thank you so very much Dr.s Weaver, Peck, and Andy W!

I was beginning to think that making such a graph would require Stata or R..
I'll try your suggestions and post back here on how it goes~~ :)

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Jon Peck
That's why they call the degree a doctorate.

Equally logically, a cyclist riding clipless pedals clips in to them.

On Sat, Sep 10, 2016 at 7:26 AM, Mike Palij <[hidden email]> wrote:
They're not real doctors, they're Ph.D.s -- a Ph.D. has
to have been involved in psychiatric or medical research
with MD PIs to get the joke.
 
Here's another "joke":
 
"Ph.D.s are great!  Every MD should own at least one!"
I've been involved in too much psychiatric research.
 
-Mike Palij, Ph.D.
New York University
 
----- Original Message -----
Sent: Saturday, September 10, 2016 9:07 AM
Subject: Re: How to modify graph's 300+ individual series along with median & 95%CI?

And Andy is a Dr too, now.

On Sat, Sep 10, 2016 at 6:20 AM, Trenton Lum <[hidden email]> wrote:
Thank you so very much Dr.s Weaver, Peck, and Andy W!

I was beginning to think that making such a graph would require Stata or R..
I'll try your suggestions and post back here on how it goes~~ :)




--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Art Kendall
In the mid-1970s, I taught stat and methods in a doctoral program in nursing.  My students taught me that Doctor is a title.  The occupation was physician.
I have been careful to make that distinction ever since.

This is what I learned:

Ph.D.'s have been "doctor" since the 1300s. M.D.s since the mid 1800s.

However, in day-to-day contexts many people have more contact with physicians than with other kinds of doctors.


For those not familiar with the "real doctor" situation.  In some health contexts physicians refuse to to use the title "Dr" for psychologists, pharmacologists, nuclear physicists, nurses, audiologists, statisticians, epidemiologists, etc. as an implied put-down.

To further make things confusing:
In formal contexts, such as calling cards a person with a PhD is
Dr. Mary Smith  with no letters after the name
whereas a physician is
Susan Jones, M. D.

Similarly in formal contexts a letter to a person with a PhD is written
Dr. Mary Smith
123 Oak Street
...
Dear Dr. Smith

a letter to a physician is
Susan Jones M.D.
453 Maple Street
...
Dear Dr. Jones,

In direct verbal address, it is Dr. Smith and Dr. Jones.

Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Bruce Weaver
Administrator
In reply to this post by Jon Peck
But I am not.  My highest degree is MSc.  ;-)

Congrats, Andy.


Jon Peck wrote
And Andy is a Dr too, now.

On Sat, Sep 10, 2016 at 6:20 AM, Trenton Lum <[hidden email]> wrote:

> Thank you so very much Dr.s Weaver, Peck, and Andy W!
>
> I was beginning to think that making such a graph would require Stata or
> R..
> I'll try your suggestions and post back here on how it goes~~ :)
>
>
>
> --
> View this message in context: http://spssx-discussion.
> 1045642.n5.nabble.com/How-to-modify-graph-s-300-individual-
> series-along-with-median-95-CI-tp5733052p5733107.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>



--
Jon K Peck
[hidden email]

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Jon Peck
I dub you Dr of SPSS, honoris causa.

On Sat, Sep 10, 2016 at 11:23 AM, Bruce Weaver <[hidden email]> wrote:
But I am not.  My highest degree is MSc.  ;-)

Congrats, Andy.



Jon Peck wrote
> And Andy is a Dr too, now.
>
> On Sat, Sep 10, 2016 at 6:20 AM, Trenton Lum <

> trentonlum08@

> > wrote:
>
>> Thank you so very much Dr.s Weaver, Peck, and Andy W!
>>
>> I was beginning to think that making such a graph would require Stata or
>> R..
>> I'll try your suggestions and post back here on how it goes~~ :)
>>
>>
>>
>> --
>> View this message in context: http://spssx-discussion.
>> 1045642.n5.nabble.com/How-to-modify-graph-s-300-individual-
>> series-along-with-median-95-CI-tp5733052p5733107.html
>> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>>

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>
>
>
>
> --
> Jon K Peck

> jkpeck@

>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/How-to-modify-graph-s-300-individual-series-along-with-median-95-CI-tp5733052p5733113.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How to modify graph's 300+ individual series along with median & 95%CI?

Bruce Weaver
Administrator
Thanks Jon.  

Meanwhile, it occurred to me that I was forgetting that I do in fact have a PhD (in Advanced Pedantics) from the University of Bums on Seats.  But I suspect it may not be universally recognized.  ;-)

http://cynicalbastards.com/ubs/edegree.html


Jon Peck wrote
I dub you Dr of SPSS, honoris causa.

On Sat, Sep 10, 2016 at 11:23 AM, Bruce Weaver <[hidden email]>
wrote:

> But I am not.  My highest degree is MSc.  ;-)
>
> Congrats, Andy.
>
>
>
> Jon Peck wrote
> > And Andy is a Dr too, now.
> >
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).