Dear all,
How to add/put vertical and horizontal error bar in scatter plot ? Thanks... |
El 13/02/2011 17:56, muhammad hanif wrote:
Hi Muhammad Hanif: You don't give many details, but I think this syntax (provided by Jon Peck time ago and modified later by me) might be a good starting point: * Sample dataset *. set locale=english. DATA LIST FREE/Group Gluc Triglic. BEGIN DATA 1 5.17 1.51 1 5.25 1.64 1 5.31 1.59 1 4.58 1.52 1 5.56 1.64 1 5.15 1.35 1 5.33 1.68 1 5.29 1.30 1 5.01 1.91 1 5.88 1.30 2 4.92 1.32 2 4.71 1.41 2 4.79 1.24 2 4.04 1.24 2 4.82 1.39 2 4.41 1.32 2 4.89 1.36 2 4.60 1.33 2 4.75 1.20 2 5.33 1.41 2 4.67 1.18 2 4.08 1.37 2 5.19 1.28 2 4.77 1.05 2 4.94 0.99 2 4.65 1.31 2 4.76 1.29 2 5.33 1.20 2 4.70 1.18 2 5.02 1.13 END DATA. VALUE LABEL Group 1 'Control' 2' Treated'. * Graph with Colors *. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=MEANSD(Gluc,1)[NAME="MEAN_Gluc" LOW="MEAN_Gluc_LOW" HIGH="MEAN_Gluc_HIGH"] MEANSD(Triglic,1)[NAME="MEAN_Triglic" LOW="MEAN_Triglic_LOW" HIGH="MEAN_Triglic_HIGH"] Group MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: MEAN_Gluc=col(source(s), name("MEAN_Gluc")) DATA: LOW_Gluc=col(source(s), name("MEAN_Gluc_LOW")) DATA: HIGH_Gluc=col(source(s), name("MEAN_Gluc_HIGH")) DATA: MEAN_Triglic=col(source(s), name("MEAN_Triglic")) DATA: LOW_Triglic=col(source(s), name("MEAN_Triglic_LOW")) DATA: HIGH_Triglic=col(source(s), name("MEAN_Triglic_HIGH")) DATA: Group=col(source(s), name("Group"), unit.category()) GUIDE: axis(dim(1), label("Glucose")) GUIDE: axis(dim(2), label("Trigliceryde")) GUIDE: legend(aesthetic(aesthetic.color.exterior)) ELEMENT: edge(position(MEAN_Gluc*(LOW_Triglic+HIGH_Triglic)),color.interior(Group)) ELEMENT: edge(position((LOW_Gluc+HIGH_Gluc)*MEAN_Triglic),color.interior(Group)) ELEMENT: point(position(MEAN_Gluc*MEAN_Triglic),color.interior(Group),color.exterior(Group)) END GPL. * Graph with Patterns *. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=MEANSD(Gluc,1)[NAME="MEAN_Gluc" LOW="MEAN_Gluc_LOW" HIGH="MEAN_Gluc_HIGH"] MEANSD(Triglic,1)[NAME="MEAN_Triglic" LOW="MEAN_Triglic_LOW" HIGH="MEAN_Triglic_HIGH"] Group MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: MEAN_Gluc=col(source(s), name("MEAN_Gluc")) DATA: LOW_Gluc=col(source(s), name("MEAN_Gluc_LOW")) DATA: HIGH_Gluc=col(source(s), name("MEAN_Gluc_HIGH")) DATA: MEAN_Triglic=col(source(s), name("MEAN_Triglic")) DATA: LOW_Triglic=col(source(s), name("MEAN_Triglic_LOW")) DATA: HIGH_Triglic=col(source(s), name("MEAN_Triglic_HIGH")) DATA: Group=col(source(s), name("Group"), unit.category()) GUIDE: axis(dim(1), label("Glucose")) GUIDE: axis(dim(2), label("Trigliceryde")) GUIDE: legend(aesthetic(aesthetic.shape.exterior)) ELEMENT: point(position(MEAN_Gluc*MEAN_Triglic),shape(Group),color.interior(color.black)) ELEMENT: edge(position(MEAN_Gluc*(LOW_Triglic+HIGH_Triglic))) ELEMENT: edge(position((LOW_Gluc+HIGH_Gluc)*MEAN_Triglic)) END GPL. If this is not what you want/need, please give more details (explain the problem, give some smple data, describe your goal...) Best regards, Marta GG -- For miscellaneous SPSS related statistical stuff, visit: http://gjyp.nl/marta/ |
I am out of the office the week of Monday February 14th.
If you need urgent assistance please contact Barbara Bilodeau.
Thank you, Jason
|
Free forum by Nabble | Edit this page |