Building a GUI around cranvas

49 views
Skip to first unread message

sebble

unread,
Jul 4, 2011, 6:19:49 AM7/4/11
to cranvas
Two short questions:

Is there any expectation for cranvas to be embedded in a ggraphics()
element of gWidgetsQt?

Is it currently possible to either select multiple individual points
on a scatterplot, or what is the best way to get notification of a
selection change (possibly via callback)?

Michael Lawrence

unread,
Jul 5, 2011, 9:37:15 AM7/5/11
to cra...@googlegroups.com
On Mon, Jul 4, 2011 at 3:19 AM, sebble <sebble.com@googlemail.com> wrote:
Two short questions:

Is there any expectation for cranvas to be embedded in a ggraphics()
element of gWidgetsQt?


No, ggraphics() is an R graphics device; cranvas is not compatible with that. We're working on an abstraction for interactive graphics that parallels the gWidgets abstraction for GUIs. Hopefully the two could interoperate at some level.
 

sebble

unread,
Jul 5, 2011, 9:49:41 AM7/5/11
to cranvas


On Jul 5, 2:37 pm, Michael Lawrence <lawrence.mich...@gene.com> wrote:
> On Mon, Jul 4, 2011 at 3:19 AM, sebble <sebble....@googlemail.com> wrote:
> > Two short questions:
>
> > Is there any expectation for cranvas to be embedded in a ggraphics()
> > element of gWidgetsQt?
>
> No, ggraphics() is an R graphics device; cranvas is not compatible with
> that. We're working on an abstraction for interactive graphics that
> parallels the gWidgets abstraction for GUIs. Hopefully the two could
> interoperate at some level.

That sounds great, I realise what I just asked now, clearly cranvas
isn't a graphics device, do you think it would be difficult to embed
cranvas plots into a GUI created with gWidgets in their current
states, would a significant amount of work be needed to unwrap the
qtpaint layers from the window you are using and embed it into a the
gWidgetsQt framework as a new widget?
>
>
>
>
>
>
>
> > Is it currently possible to either select multiple individual points
> > on a scatterplot, or


> > what is the best way to get notification of a
> > selection change (possibly via callback)?

Any thoughts on this anyone?

Michael Lawrence

unread,
Jul 5, 2011, 10:13:46 AM7/5/11
to cra...@googlegroups.com
On Tue, Jul 5, 2011 at 6:49 AM, sebble <sebble.com@googlemail.com> wrote:


On Jul 5, 2:37 pm, Michael Lawrence <lawrence.mich...@gene.com> wrote:
> On Mon, Jul 4, 2011 at 3:19 AM, sebble <sebble....@googlemail.com> wrote:
> > Two short questions:
>
> > Is there any expectation for cranvas to be embedded in a ggraphics()
> > element of gWidgetsQt?
>
> No, ggraphics() is an R graphics device; cranvas is not compatible with
> that. We're working on an abstraction for interactive graphics that
> parallels the gWidgets abstraction for GUIs. Hopefully the two could
> interoperate at some level.

That sounds great, I realise what I just asked now, clearly cranvas
isn't a graphics device, do you think it would be difficult to embed
cranvas plots into a GUI created with gWidgets in their current
states, would a significant amount of work be needed to unwrap the
qtpaint layers from the window you are using and embed it into a the
gWidgetsQt framework as a new widget?
>

The PlotView object is already a QWidget. Presumably it would be pretty easy to feed this to gWidgetsQt. That's a better question for John though.

Michael

 

Sebastian Mellor

unread,
Jul 14, 2011, 9:06:30 AM7/14/11
to cranvas
Thanks for your help,

I asked John about this on SO
http://stackoverflow.com/questions/6669719/can-i-embed-cranvas-interactive-graphics-into-gwidgets-gwidgetsqt-in-r
and he was very helpful, he has modified gWidgetsQt to allow embedding
a cranvas plot within a gWidgets GUI.

Regards,
Seb

On Jul 5, 3:13 pm, Michael Lawrence <lawrence.mich...@gene.com> wrote:
Reply all
Reply to author
Forward
0 new messages