BookmarkSubscribeSubscribe to RSS Feed
hardner

Community Trekker

Joined:

Nov 13, 2012

add graphics script on top of points?

If I draw on a graph using Add Graphics Script() is there a way to force that to be on top of the data points rather than behind?  Or, equivalently, to make the points move back?  Giving the points some transparency is somewhat helping me but I'd still like to be able to draw on top of them.

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp

Staff

Joined:

Jun 23, 2011

Solution

Re: add graphics script on top of points?

Note the '3' and the '5' in the graphics scripts below. You can see which scripts are tied to the graphics box by right-clicking on it and selecting 'Customize...'.

NamesDefaultToHere(1);

// Some data

dt = NewTable("Point Cloud",

  NewColumn("X", Numeric, Continuous, Formula(RandomNormal())),

  NewColumn("Y", Numeric, Continuous, Formula(RandomNormal())),

  AddRows(10000)

);

// Bivariate with two graphics scripts

biv = dt << Bivariate(

  Y( :Y ),

  X( :X ),

  SendToReport(

  Dispatch(

  {},

  "Bivar Plot",

  FrameBox,

  {Frame Size( 497, 377 ),

  Add Graphics Script(

  3,

  Description( "Behind Points" ),

  Pen Color( "Red" );

  H Line( 0 );

  ), Add Graphics Script(

  5,

  Description( "In front of Points" ),

  Pen Color( "Green" );

  V Line( 0 );

  )}

  )

  )

  );

2 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

Solution

Re: add graphics script on top of points?

Note the '3' and the '5' in the graphics scripts below. You can see which scripts are tied to the graphics box by right-clicking on it and selecting 'Customize...'.

NamesDefaultToHere(1);

// Some data

dt = NewTable("Point Cloud",

  NewColumn("X", Numeric, Continuous, Formula(RandomNormal())),

  NewColumn("Y", Numeric, Continuous, Formula(RandomNormal())),

  AddRows(10000)

);

// Bivariate with two graphics scripts

biv = dt << Bivariate(

  Y( :Y ),

  X( :X ),

  SendToReport(

  Dispatch(

  {},

  "Bivar Plot",

  FrameBox,

  {Frame Size( 497, 377 ),

  Add Graphics Script(

  3,

  Description( "Behind Points" ),

  Pen Color( "Red" );

  H Line( 0 );

  ), Add Graphics Script(

  5,

  Description( "In front of Points" ),

  Pen Color( "Green" );

  V Line( 0 );

  )}

  )

  )

  );

hardner

Community Trekker

Joined:

Nov 13, 2012

Re: add graphics script on top of points?

Thanks!  That did it.