Line charts: x axis with continous scale?

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

Line charts: x axis with continous scale?

valerie_s

Hi

 

I would like to be able to use line charts to plot data on continuous scale but just cannot work out how to do it. In following example, the variable ‘period’ has values: 1969, 1974, 1979, 1984, 1994, 1999 but has no data for year 1989. I would like the x axis to reflect this. The code I use (given below) plots the values equally spaced. I tried defining period as a scale but that did not work either. I would be grateful for any suggestions. Thanks.

 

Valerie

 

 

 

>>>>>>>

 

VARIABLE LEVEL  period(SCALE).

EXECUTE.

 

GRAPH

  /LINE(MULTIPLE)=MEAN(b) BY period BY dg

  /PANEL COLVAR=sex COLOP=CROSS.

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Line charts: x axis with continuous scale?

Jon K Peck
If period is actually scale, use GGRAPH for this - Graphs > Chart Builder.  The Legacy dialog, i.e., the GRAPH command, treats the x axis as categorical.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Valerie Seagroatt <[hidden email]>
To:        [hidden email],
Date:        02/26/2014 09:26 AM
Subject:        [SPSSX-L] Line charts: x axis with continous scale?
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi
 
I would like to be able to use line charts to plot data on continuous scale but just cannot work out how to do it. In following example, the variable ‘period’ has values: 1969, 1974, 1979, 1984, 1994, 1999 but has no data for year 1989. I would like the x axis to reflect this. The code I use (given below) plots the values equally spaced. I tried defining period as a scale but that did not work either. I would be grateful for any suggestions. Thanks.
 
Valerie
 
 
 
>>>>>>>
 
VARIABLE LEVEL  period(SCALE).
EXECUTE.
 
GRAPH
  /LINE(MULTIPLE)=MEAN(b) BY period BY dg
  /PANEL COLVAR=sex COLOP=CROSS.