The reason my `wd 'msgs'` does not work is because, when responding 
to the paint messages, WD reads the graphics buffer instead of 
calling the `paint` verb (why is not clear); and initially 
the buffer is blank. So pre-populating the buffer fixes it. 
So another higher-level alternative to above is inserting 
the paint routine before returning from `viewmat`.

...
x vmrun__a y
jvm_show__a''   NB. <-- insert before returning
empty''



> From: Devon McCormick <[email protected]>
> 
> This whole thread is a repeat of one from almost exactly a year ago.  I've
> posted a solution here:
> http://www.jsoftware.com/jwiki/DevonMcCormick/ViewmatFix .
> 
> This is Dave Mitchell's suggestion to add a call to "jvm_show" near the end
> of "vmrun" in the viewmat code.
> 
> Should the base distribution reflect this change?
> 
> On Sun, Dec 20, 2009 at 9:13 PM, Oleg Kobchenko wrote:
> 
> > How about
> >  wd 'msgs'
> > ?
> >
> > http://www.jsoftware.com/pipermail/programming/2008-December/013236.html
> >
> >
> >
> >
> > > From: Kairit Sirts 
> > >
> > > Delay won't help.
> > >
> > > Kairit Sirts
> > >
> > > 2009/12/20 Björn Helgason
> > >
> > > > Probably need to put in a delay between the two lines
> > > >
> > > > 2009/12/20 Kairit Sirts :
> > > > > Hi!
> > > > >
> > > > > I have binary matrices, which I want to plot with viewmat and save to
> > > > .bmp
> > > > > files. Suppose I have the code something like that:
> > > > >
> > > > > require 'viewmat'
> > > > >
> > > > > plot_min =: 3 : 0
> > > > > viewmat ? (,~y)$2
> > > > >        savemat_jviewmat_ jpath '~user\',(":y),'.bmp'
> > > > > )
> > > > >
> > > > > The problem is, that running the both sentences manually and
> > separately
> > > > will
> > > > > create the correct plot and saves the correct bmp file, but running
> > the
> > > > verb
> > > > > results in an empty plot and also empty file. What am I doing wrong?
> > > > >
> > > > > Kairit Sirts
> > > > >
> > ----------------------------------------------------------------------
> > > >
> > > >
> > > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> 
> 
> 
> -- 
> 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