sgplot series repeated line type and color

  • Follow


Hi, SAS-L,
I have a quick question about sgplot. I tried to plot 30 series in the
same time useing proc sgplot,  but the line type and color repeated so
that I can hardly recognize them. Does anyone have idea of how to
avoid this kind of cycle.
Thanks,
1
Reply Larry 4/6/2010 8:31:46 PM

On Tuesday, April 6, 2010 10:31:46 PM UTC+2, L H wrote:
> Hi, SAS-L,
> I have a quick question about sgplot. I tried to plot 30 series in the
> same time useing proc sgplot,  but the line type and color repeated so
> that I can hardly recognize them. Does anyone have idea of how to
> avoid this kind of cycle.
> Thanks,

Hi,
I have the same problem: did you find a solution?
Thank,
Paola
0
Reply iriseasky (1) 5/27/2013 1:46:30 PM


Line type and color is controlled by style. "Default" only goes up to 12 di=
fferent lines. You can create you own style with proc template:

data xx;
do id=3D1 to 30;
 do x=3D1 to 2;
    y=3Did;
    output;
 end;
end;
run;

proc template;=20
   define style mycolor;                                              =20
   parent =3Dstyles.default;=20
      class GraphData1 / linestyle =3D 1 contrastcolor =3D cx0000FF;
      class GraphData2 / linestyle =3D 2 contrastcolor =3D cx0000DD;
      class GraphData3 / linestyle =3D 3 contrastcolor =3D cx0000BB;
      class GraphData4 / linestyle =3D 4 contrastcolor =3D cx000099;
      class GraphData5 / linestyle =3D 5 contrastcolor =3D cx00FF00;
      class GraphData6 / linestyle =3D 6 contrastcolor =3D cx00DD00;
      class GraphData7 / linestyle =3D 7 contrastcolor =3D cx00BB00;
      class GraphData8 / linestyle =3D 8 contrastcolor =3D cx009900;
      class GraphData9 / linestyle =3D 9 contrastcolor =3D cxFF0000;
      class GraphData10 / linestyle =3D 10 contrastcolor =3D cxDD0000;
      class GraphData11 / linestyle =3D 11 contrastcolor =3D cxBB0000;
      class GraphData12 / linestyle =3D 12 contrastcolor =3D cx990000;
      class GraphData13 / linestyle =3D 13 contrastcolor =3D cxFF00FF;
      class GraphData14 / linestyle =3D 14 contrastcolor =3D cxDD00DD;
      class GraphData15 / linestyle =3D 15 contrastcolor =3D cxBB00BB;
      class GraphData16 / linestyle =3D 16 contrastcolor =3D cx333333;
      class GraphData17 / linestyle =3D 17 contrastcolor =3D cx00FFFF;
      class GraphData18 / linestyle =3D 18 contrastcolor =3D cx00DDDD;
      class GraphData19 / linestyle =3D 19 contrastcolor =3D cx00BBBB;
      class GraphData20 / linestyle =3D 20 contrastcolor =3D cx009999;
      class GraphData21 / linestyle =3D 21 contrastcolor =3D cxFFFF00;
      class GraphData22 / linestyle =3D 22 contrastcolor =3D cxDDDD00;
      class GraphData23 / linestyle =3D 23 contrastcolor =3D cxBBBB00;
      class GraphData24 / linestyle =3D 24 contrastcolor =3D cx999900;
      class GraphData25 / linestyle =3D 25 contrastcolor =3D cx555555;
   end;                                                                    =
  =20
run;                           =20

ods listing close;
ods html file=3D"c:\temp\junk.html" gpath=3D"c:\temp" style=3Dmycolor;

proc sgplot data=3Dxx;
series x=3Dx y=3Dy / group=3Did;
run;

ods _all_ close;

The above code creates a style called mycolor, which defines 25 different l=
ine types/colors, it is used with ods/html and sgplot, you can see from the=
 result that the line type/colors starts to repeat after 25. If you want 30=
 different type, you can add more in the proc template.

HTH

Ya

On Monday, May 27, 2013 6:46:30 AM UTC-7, Paola wrote:
> On Tuesday, April 6, 2010 10:31:46 PM UTC+2, L H wrote:
>=20
> > Hi, SAS-L,
>=20
> > I have a quick question about sgplot. I tried to plot 30 series in the
>=20
> > same time useing proc sgplot,  but the line type and color repeated so
>=20
> > that I can hardly recognize them. Does anyone have idea of how to
>=20
> > avoid this kind of cycle.
>=20
> > Thanks,
>=20
>=20
>=20
> Hi,
>=20
> I have the same problem: did you find a solution?
>=20
> Thank,
>=20
> Paola

0
Reply huang8012 (266) 5/28/2013 1:12:31 AM

2 Replies
682 Views

(page loaded in 0.092 seconds)

Similiar Articles:













7/23/2012 9:28:56 AM


Reply: