Roelof - this suggests something wrong with your J installation. When I run "test_viewmat" I get the display and the file that matches it.
What version are you running? Try 9!:14 '' to get this info. My OS is XP SP-2. I just tried this on a 32-bit Vista machine and it works there. Perhaps it's something with 64-bit? Good luck, Devon On Tue, Dec 16, 2008 at 11:39 AM, Roelof K Brouwer <[email protected]>wrote: > I modified vmrun as suggested > the display is very nice but at the end of it the execution window is dead > and no file appears > I have to kill j.exe through the task manager > > The file that I run consists only of > load 'viewmat color16' > > test_viewmat=:3 : 0 > ( 1 4 14 {". COLOR16) viewmat i.4 4 > savemat_jviewmat_ 'C:\Temp\something.bmp' > ) > > PS at least I get the display but still no save > > cheers > > > Roelof > > "Have a cool mind and a warm heart" - Ajahn Sona > "Like ......(hamsters on a wheel), (ambitious people) still climb and > climb, with great labor, and incessant anxiety, but never reach the top." > Robert Browning > "We shall not cease from exploration. And at the end of all our exploring > Will be to arrive were we started and know the place for the first time" - > T. S. Eliot > > > Dr. Roelof K. Brouwer PH.D. P.Eng. > Professor Emeritus > Dept. of Computing Science > School of Advanced Technologies and Mathematics > Thompson Rivers University > 900 McGill Road > Kamloops, BC > Canada, V2C 5N3 > > email : [email protected] > www.tru.ca/advtech/compsci/faculty/rbrouwer > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Eric Iverson > Sent: December-16-08 6:20 AM > To: Programming forum > Subject: Re: [Jprogramming] savemat_jviewmat_ > > I just started paying attention to this thread. I experimented enough to > verify that the problem is a gl2 bug. This should work as desired and it is > a bug that it doesn't. The bug is unlikely to be fixed until a future > release. > > I haven't tried it yet, but David's suggested minor code modification to > viewmat is a plausible workaround for the bug. > On Tue, Dec 16, 2008 at 9:12 AM, David Mitchell > <[email protected]>wrote: > > > Perhaps this is too simple or has side effects I haven't encountered, but > > it > > seems to work for me > > > > open'viewmat' > > > > change > > > > NB. ========================================================= > > vmrun=: 4 : 0 > > ... > > wd 'pmovex ',": 0 >. fx,fy,dif + fw,fh > > wd 'pshow' > > > > to > > NB. ========================================================= > > vmrun=: 4 : 0 > > ... > > wd 'pmovex ',": 0 >. fx,fy,dif + fw,fh > > jvm_show '' NB. DM 2008 12 16 > > wd 'pshow' > > > > Save and load viewmat.ijs . > > > > Run test_viewmat'' . On Vista 32, for me, Viewmat now displays correctly > > and > > saves a good BMP. > > > > -- > > Regards, > > David Mitchell > > > > Roelof K Brouwer wrote: > > > Sorry I don't have much of an idea of what you are talking about. That > is > > because I use J mainly as a calculation server for expressing algorithms > > that I develop and execute. Graphic output has been outside my domain so > far > > and I was looking for a simple working way to produce black/white/grey > > graphs of matrices and then saving them in files, without my > intervention, > > at several locations in my verb. The displays saved should be easily > > portable into a word document where I can resize if necessarily. I can do > > this with displays produced with plot ( density graphs ) but viewmat > seemed > > so much nicer. If I used clipboard I would be restricted to one save > unless > > I intervened. > > > > > > cheers > > > > > > > > > Roelof > > > > > > "Have a cool mind and a warm heart" - Ajahn Sona > > > "Like ......(hamsters on a wheel), (ambitious people) still climb and > > climb, with great labor, and incessant anxiety, but never reach the top." > > Robert Browning > > > "We shall not cease from exploration. And at the end of all our > exploring > > > Will be to arrive were we started and know the place for the first > time" > > - T. S. Eliot > > > > > > > > > Dr. Roelof K. Brouwer PH.D. P.Eng. > > > Professor Emeritus > > > Dept. of Computing Science > > > School of Advanced Technologies and Mathematics > > > Thompson Rivers University > > > 900 McGill Road > > > Kamloops, BC > > > Canada, V2C 5N3 > > > > > > email : [email protected] > > > www.tru.ca/advtech/compsci/faculty/rbrouwer > > > > > > > > > -----Original Message----- > > > From: [email protected] [mailto: > > [email protected]] On Behalf Of bill lam > > > Sent: December-15-08 10:43 PM > > > To: [email protected] > > > Subject: Re: [Jprogramming] savemat_jviewmat_ > > > > > > On Sun, 14 Dec 2008, Roelof K Brouwer wrote: > > >> ( 1 4 14 {". COLOR16) viewmat i.4 4 > > >> > > >> savemat_jviewmat_ 'C:\Temp\garbage.bmp' > > > > > > The root of problem is that viewmat is implemented by J gl2 verbs and > > > gl2 can only render itself when J is idle. A possible solution is to > > > re-implement viewmat with other libraries. For example, in the recent > > > plot, Chris wrote cover verbs using gtk to emulate some J gl2 and the > > > plot itself does not need major modification to incorporate gtk > > > backend. Parallel to this, cover verbs using gdiplus can be added to > > > viewmat to make it work without gl2 under m$ window. The gdiplus > > > addon is a good starting point. For linux jconsole, I suggest using > > > gtk instead. > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > 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
