18.12.2012 Views

Embedding R Tutorial

Embedding R Tutorial

Embedding R Tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Graphics Output (2/2)<br />

� only one device can be active at the<br />

moment<br />

– remove the device before installing another<br />

� multiple devices can be on the same form<br />

' gfxDev1 is a StatConnectorGraphicsDevice<br />

' gfxDev2 is a GraphicsDevice<br />

r.AddGraphicsDevice "gfx", gfxDev1.GetGFX<br />

r.EvaluateNoReturn "plot(sin(1:100))"<br />

r.RemoveGraphicsDevice "gfx"<br />

gfxDev2.DeviceName = "gfx"<br />

Set gfxDev2.Connector = r<br />

gfxDev2.AddToConnector<br />

r.EvaluateNoReturn "plot(1:100)"<br />

gfxDev2.RemoveFromConnector

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!