Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

If a line graph has markers and error bars, the legend will not show the markers.

333 views
Skip to first unread message

Richard Anderson

unread,
Feb 15, 2013, 8:34:53 PM2/15/13
to
For many years, I've complained to SPSS that if a line graph has both markers and error bars, the legend will not show the markers. This is especially problematic when the graph is black-and-white, and when each of the graph's multiple lines has the same line style (line lack of markers, in the legend, makes the graph ambiguous. In recent years I've had trouble finding a way to re-communicate this problem to IBM SPSS. So I'm hoping that some of you who have access to SPSS technical support will consider relaying reporting this years-long bug (SPSS 20) to IBM.

Jon Peck

unread,
Feb 15, 2013, 11:15:24 PM2/15/13
to
On Friday, February 15, 2013 6:34:53 PM UTC-7, Richard Anderson wrote:
> For many years, I've complained to SPSS that if a line graph has both markers and error bars, the legend will not show the markers. This is especially problematic when the graph is black-and-white, and when each of the graph's multiple lines has the same line style (line lack of markers, in the legend, makes the graph ambiguous. In recent years I've had trouble finding a way to re-communicate this problem to IBM SPSS. So I'm hoping that some of you who have access to SPSS technical support will consider relaying reporting this years-long bug (SPSS 20) to IBM.

I constructed a chart with two lines with error bars AND markers - one set square and the other set using "flower". Is this what you want? Using the employee data.sav file, run this.

GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=educ MEANCI(salary, 95)[name="MEAN_salary"
LOW="MEAN_salary_LOW" HIGH="MEAN_salary_HIGH"]
MEANCI(salbegin, 95)[name="MEAN_salbegin"
LOW="MEAN_salbegin_LOW" HIGH="MEAN_salbegin_HIGH"]
MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: educ=col(source(s), name("educ"), unit.category())
DATA: MEAN_salary=col(source(s), name("MEAN_salary"))
DATA: LOW=col(source(s), name("MEAN_salary_LOW"))
DATA: HIGH=col(source(s), name("MEAN_salary_HIGH"))
DATA: MEAN_salbegin=col(source(s), name("MEAN_salbegin"))
DATA: LOW2=col(source(s), name("MEAN_salbegin_LOW"))
DATA: HIGH2=col(source(s), name("MEAN_salbegin_HIGH"))
GUIDE: axis(dim(1), label("Educational Level (years)"))
GUIDE: axis(dim(2), label("Mean Current Salary"))
GUIDE: text.footnote(label("Error Bars: 95% CI"))
SCALE: cat(dim(1), include("8", "12", "14", "15", "16", "17", "18", "19", "20", "21"))
SCALE: linear(dim(2), include(0))
ELEMENT: point(position(educ*MEAN_salary), shape.interior(shape.square))
ELEMENT: interval(position(region.spread.range(educ*(LOW+HIGH))), shape.interior(shape.ibeam))
ELEMENT: line(position(educ*MEAN_salary))
ELEMENT: point(position(educ*MEAN_salbegin), shape.interior(shape.flower))
ELEMENT: interval(position(region.spread.range(educ*(LOW2+HIGH2))), shape.interior(shape.ibeam))
ELEMENT: line(position(educ*MEAN_salbegin))
END GPL.

Richard Anderson

unread,
Feb 19, 2013, 9:51:22 PM2/19/13
to
Thanks for trying this. But actually, the script you've provided doesn't display a legend at all. The difficulty in SPSS is not in producing a graph with error bars and markers. Rather, the problem is in getting the markers to show up in the legend. One can get line markers in the legend, or one can include error bars in the graph, but if one includes error bars then it is not possible to have the legend display line markers. Here is a web page that shows a graph with line markers and error bars, and a useless legend (along with the script that generated the graph): https://sites.google.com/site/dataspace3579/temp

arch...@coik.org

unread,
Dec 10, 2018, 8:17:40 PM12/10/18
to


still happening version 25, no workaround available

Richard Anderson

unread,
Dec 10, 2018, 8:24:03 PM12/10/18
to
On Monday, December 10, 2018 at 8:17:40 PM UTC-5, arch...@coik.org wrote:
> still happening version 25, no workaround available

Supposedly, version 26 will have a different graphing engine. Maybe that will fix it.
0 new messages