INLINETEMPLATE with line break

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

INLINETEMPLATE with line break

la volta statistics

Dear all

 

Sometimes the INLINETEMPLATE statement in the GGRAPH code gets rather long.

I am looking for a solution to add a line break to the  INLINETEMPLATE statement. I tried  various things but as soon as I split the line in more than one, the code does not work anymore.

 

I would like to have the INLINETEMPLATE statement as follows:

INLINETEMPLATE=["<addFrame count='1'  styleOnly='true' type='graph'>

                <style color='#ef3338' number='1' visible='true'/></addFrame> "].

 

 

Does anyone have a solution for this?

TIA, Christian

 

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=DEHSEV_V4 HEROIN_V4[LEVEL=SCALE] COUNTRY Medi_P1 MISSING=LISTWISE

    REPORTMISSING=NO

  /GRAPHSPEC SOURCE=INLINE

          INLINETEMPLATE=    ["<addFrame count='1'  styleOnly='true' type='graph'> <style color='#ef3338' number='1' visible='true'/></addFrame> "].

BEGIN GPL

  SOURCE: s=userSource(id("graphdataset"))

  DATA: DEHSEV_V4=col(source(s), name("DEHSEV_V4"))

  DATA: HEROIN_V4=col(source(s), name("HEROIN_V4"))

  DATA: COUNTRY=col(source(s), name("COUNTRY"), unit.category())

  DATA: Medi_P1=col(source(s), name("Medi_P1"), unit.category())

  GUIDE: axis(dim(1), label("Craving heroin (VAS) (Week 02)"))

  GUIDE: axis(dim(2), label("Heroin (Week 02)"))

            GUIDE: legend(aesthetic(aesthetic.color.exterior), label(" "))

  ELEMENT: point.jitter(position(DEHSEV_V4 / Medi_P1 * HEROIN_V4), color.exterior(COUNTRY))

END GPL.

 

**********************************
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:
[hidden email] 
Web:
www.lavolta.ch

 

Reply | Threaded
Open this post in threaded view
|

Re: INLINETEMPLATE with line break

David Marso
Administrator
I can't test this but perhaps:
INLINETEMPLATE=["<addFrame count='1'  styleOnly='true' type='graph'>" +
                "<style color='#ef3338' number='1' visible='true'/></addFrame> "].
la volta statistics wrote
Dear all

 

Sometimes the INLINETEMPLATE statement in the GGRAPH code gets rather long.

I am looking for a solution to add a line break to the  INLINETEMPLATE
statement. I tried  various things but as soon as I split the line in more
than one, the code does not work anymore.

 

I would like to have the INLINETEMPLATE statement as follows:

INLINETEMPLATE=["<addFrame count='1'  styleOnly='true' type='graph'> 

                <style color='#ef3338' number='1'
visible='true'/></addFrame> "].

 

 

Does anyone have a solution for this?

TIA, Christian

 

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=DEHSEV_V4
HEROIN_V4[LEVEL=SCALE] COUNTRY Medi_P1 MISSING=LISTWISE

    REPORTMISSING=NO

  /GRAPHSPEC SOURCE=INLINE

          INLINETEMPLATE=    ["<addFrame count='1'  styleOnly='true'
type='graph'> <style color='#ef3338' number='1' visible='true'/></addFrame>
"].

BEGIN GPL

  SOURCE: s=userSource(id("graphdataset"))

  DATA: DEHSEV_V4=col(source(s), name("DEHSEV_V4"))

  DATA: HEROIN_V4=col(source(s), name("HEROIN_V4"))

  DATA: COUNTRY=col(source(s), name("COUNTRY"), unit.category())

  DATA: Medi_P1=col(source(s), name("Medi_P1"), unit.category())

  GUIDE: axis(dim(1), label("Craving heroin (VAS) (Week 02)"))

  GUIDE: axis(dim(2), label("Heroin (Week 02)"))

            GUIDE: legend(aesthetic(aesthetic.color.exterior), label(" "))

  ELEMENT: point.jitter(position(DEHSEV_V4 / Medi_P1 * HEROIN_V4),
color.exterior(COUNTRY))

END GPL.

 

**********************************
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:[hidden email]> mailto:[hidden email] 
Web:  <http://www.lavolta.ch> www.lavolta.ch
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"