|
Dear all How can I hide the legend in
a histogram? I tried: GUIDE:
legend(aesthetic(aesthetic.color.interior), null()) without success. GGRAPH /GRAPHDATASET
NAME="graphdataset" VARIABLES=salary gender MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC
SOURCE=INLINE. BEGIN GPL SOURCE:
s=userSource(id("graphdataset")) DATA:
salary=col(source(s), name("salary")) GUIDE:
legend(aesthetic(aesthetic.color.interior), null()) GUIDE:
axis(dim(1), label("Current Salary")) GUIDE:
axis(dim(2), label("Frequency")) ELEMENT:
interval(position(summary.count(bin.rect(salary))), shape.interior(shape.square)) END GPL. Thanks in advance Christian ********************************** |
|
Here's one way.
Make a histogram, open it in the Chart Editor, and delete the legend. Then use Save Template to save that specification, checking only the legend display box. Refer to that in your chart specifications on the GRAPHSPEC subcommand, e.g., TEMPLATE=["C:\spss20\Looks\nolegend.sgt"]. Jon Peck (no "h") Senior Software Engineer, IBM [hidden email] new phone: 720-342-5621 From: la volta statistics <[hidden email]> To: [hidden email] Date: 08/29/2011 06:04 AM Subject: [SPSSX-L] GPL: Hiding legend Sent by: "SPSSX(r) Discussion" <[hidden email]> Dear all How can I hide the legend in a histogram? I tried: GUIDE: legend(aesthetic(aesthetic.color.interior), null()) without success. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=salary gender MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: salary=col(source(s), name("salary")) GUIDE: legend(aesthetic(aesthetic.color.interior), null()) GUIDE: axis(dim(1), label("Current Salary")) GUIDE: axis(dim(2), label("Frequency")) ELEMENT: interval(position(summary.count(bin.rect(salary))), shape.interior(shape.square)) END GPL. Thanks in advance Christian ********************************** la volta statistics Christian Schmidhauser, Dr.phil.II Weinbergstrasse 108 CH-8006 Zürich Tel: +41 (043) 233 98 01 Fax: +41 (043) 233 98 02 email: mailto:schmidhauser@... Web: www.lavolta.ch |
| Free forum by Nabble | Edit this page |
