My experience is that you can use plot from jconsole to display a plot
    load 'plot'
    plot +./~ i:15

And that you can save an image directly to pdf (without displaying it first).
   ('output pdf ',jpath '~temp/myplot.pdf') plot */~ i:15

However the "save" options that should let you save to a image file
don't seem to be working (and gtk doesn't seem to honour the "visible
0" setting) in either jconsole:

   load 'plot'
   ('output gtk ;save png ',jpath '~temp/myplot.png') plot +./~ i:15
|rank error: l
|       glqwh__l y[[l=.locGL2_jgl2_
   pd 'reset'
   pd 'visible 0'
   pd +./~ i:15
   pd 'gtk'    NB. displays gtk plot in window
0
     pd 'save png'  NB. had to close gtk plot to return control to jconsole
|locale error: glqwh
|       glqwh__l y[[l=.locGL2_jgl2_

or Gtk IDE:
   load 'plot'
   plot +./~ i:15
   pd 'save png'   NB. with Plot window still open
|value error: gtk_pixbuf_new_from_data_jgtk_
|   buf=.    
gtk_pixbuf_new_from_data_jgtk_(15!:14<'d'),GDK_COLORSPACE_RGB_jgtk_,1,8,w,h,(4*w),0,0




On Wed, Mar 9, 2011 at 6:34 AM, Devon McCormick <[email protected]> wrote:
> Joey -
>
> it sounds like we're in the same boat but I'm unclear on whether I should be
> using something other than plot, or I somehow need to set up some kind of
> event loop in my jconsole, or if I'll have to resort to J-GTK to save plot
> images to file.
>
> Regards,
>
> Devon
>
> On Tue, Mar 8, 2011 at 11:58 AM, Joey K Tuttle <[email protected]> wrote:
>
>> Thank you for clarifying this. I thought it was
>> my lack of understanding that caused my jconsole
>> sessions to produce a plot and then freeze in
>> such a way that their process had to be killed by
>> another and then restarted, all this in Darwin. I
>> guess that it was ( my lack of understanding :) -
>> now maybe I can get plot to work. Thanks!
>>
>> - joey
>>
>> At 3:51 PM +0800 11/03/08, bill lam wrote:
>> >I guess that jwiki page need to mention jzplot cannot run inside jconsole
>> >because there is no event loop, that's reason why you saw it just hang or
>> >window not updated by paint events, it cannot even be closed.
>> >
>> >However jwplot works for jconsole,
>> >NB. first upgrade addons and install gdiplus addons as well,
>> >
>> >load 'plot'
>> >plot */~ i:15
>> ...
>>
> --
> Devon McCormick, CFA
> ^me^ at acm.
> org is my
> preferred e-mail
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to