From: Ben Abbott [mailto:address@hidden Sent: Wednesday, June 12, 2013 9:44 PM To: Rick M. Cox Cc: 'help-octave Octave' Subject: Re: Help with saveas and fltk From: Ben Abbott [mailto:address@hidden] Sent: Wednesday, June 12, 2013 6:59 PM To: Ben Abbott Cc: Rick M. Cox; 'help-octave Octave' Subject: Re: Help with saveas and fltk From: Ben Abbott [mailto:address@hidden] Sent: Wednesday, June 12, 2013 5:39 PM To: Rick M. Cox Cc: 'Nicholas Jankowski'; address@hidden; 'help-octave Octave' Subject: Re: Help with saveas and fltk -----Original Message----- From: address@hidden [mailto:address@hidden] On Behalf Of Nicholas Jankowski Sent: Friday, June 07, 2013 7:39 AM To: address@hidden Cc: Rick M. Cox; help-octave Octave Subject: Re: Help with saveas and fltk
On Fri, Jun 7, 2013 at 2:11 AM, Tatsuro MATSUOKA <address@hidden> wrote: > --- On Fri, 2013/6/7, Tatsuro MATSUOKA wrote: >> --- On Fri, 2013/6/7, Nicholas Jankowski wrote: >> >> > On Thu, Jun 6, 2013 at 6:25 PM, Rick M. Cox wrote: >> > Rick, would help if I could try to reproduce what you're doing. I'm not running XP, but Win7, so things might be different. The "D:/Programs" problem pops up A LOT due to microsoft's infinite wisdom of making core folders with spaces in the filename's. Not just with Octave, either. Previously conversations I've seen with that problem were with configuring editors, though. >> > If you could upload some simple m-files recreating your problem, I'd be curious to see if it occurs here. Or maybe someone else with an XP box can try recreating the issue. >> > nickj >> > >> > Nick: >> > >> > >> > >> > Thanks for the help offer. I have attached the short Octave program that is an example of my problem. >> > >> > >> > >> > My system: >> > . Pentium 4, 3.2 GHz >> > . Windows XP Pro SP3 >> > . Visual C++ 2010 Redistributable Package >> > . Octave 3.6.4 >> > . Latest version of GhostScript >> > >> > Both Octave and GhostScript are installed in paths that have no white spaces. >> > Octave commands: >> > >> > >scdraw >> > >> > >print "test.png" >> > >> > >> > >> > With 'gnuplot' everything works as expected. It takes 60 seconds for 'scdraw' to generate the Smith Chart and another 50 seconds for the print command to save the file. I can save any file format without problems. >> > >> > >> > >> > With 'fltk' the 'scdraw' program generates the Smith Chart in about 10 seconds. The print command causes the figure window to become scrambled and unresponsive. Octave is also unresponsive and I have to close it. Any file format that I try produces the same result. >> > >> > >> > >> > I hope you can help me out! >> >> > Rick >> >> > Will check it out when I'm back at work. But FYI i'm running the MinGW version on Win7, so who knows what will happen :) >> > >> > >> > regarding load time, I do notice when I do other simple things in Octave it takes a long time for the first figure to load (i usually have things set to fltk). so something as simple as: >> > plot([1 2 3]) >> > will take a long time to run once, but a 'close all' followed by plot([1 2 3]) again will pop right up (same with any other figures after the first). so i assume that the first figure has some program loading or initialization occurring. perhaps something similar here? or is it just as slow every time? >> >> Hello Rick >> >> I examined your example on 3.6.4 (VS) (Win7 64 bit core i5 4GB Ram). >> >> >> graphics_toolkit fltk >> >> scdraw >> >> tic; print -dpdf scdraw.pdf; toc >> Elapsed time is 1014.2 seconds. >> >> I also tested 3.6.4 mingw. >> >> >> graphics_toolkit fltk >> >> scdraw >> >> tic; print -dpdf scdraw.pdf; toc >> Elapsed time is 1001.72 seconds. >> >> For both cases, printing time was more than one thousand second. >> >> Printing on fltk for your example was very slow. >> >> Regards >> >> Tatsuro > > > I have tested on octave -3.7.2+ (development snapshot on Feb 23). > (http://octave.1599824.n4.nabble.com/Octave-3-7-2-Windows-VS2010-available-t d4650194.html) > >>> graphics_toolkit fltk >>> scdraw >>> tic; print -dpdf scdraw.pdf; toc > Elapsed time is 2.06 seconds. > > Speed of fltk printing seems to beimproved in the development source. > > Regards > > Tatsuro > > WOW. from 1000 to 2 seconds. now that's pretty impressive.
Tatsuro:
I installed Octave 3.7.2+ and here is what I found:
1. I cannot save .pdf file format. The Octave prompt returns after a few seconds but there is no file actually saved. 2. I can save .eps and .png file formats. It does seem that 3.7.2+ is very fast! Unfortunately the saved drawing is a mess.
Please look at the two attached files. "test2.png" is what a Smith Chart is supposed to look like (this was generated with "gnuplot"). "testK.png" is what "fltk" is producing. Something is clearly wrong with the "fltk" output although it is fast!
BTW: I really like the GUI for Octave 3.7.2+
Rick
==========
Ben, Nick, Tatsuro, et al:
I was wondering if any of you had made any progress in replicating my file save problem with 'fltk'. To recap, 'fltk' quickly generates a correct on-screen image of what I plot but when I try to save the figure it becomes corrupted. 'gnuplot' does not seem to have this problem.
I have created a very simple sequence which generates this problem on my WinXP machine:
x = linspace (-1, 1, 101); y = sqrt (1 - x.^2); plot (x, y) print "testfltk.png"
The correct semicircular plot is generated on screen but the attached 'testfltk.png' file is what results from the print command. For some reason 'fltk' periodically generates rays from the (-1, 0) point to the semicircle.
I would appreciate an opinion as to whether this is an Octave problem, a fltk problem or a problem with my particular WinXP configuration.
Rick, scdraw.m and your example above work for me on MacOS X. My impression is that there is something wrong with Octave/fltk on WinXP or with your Ghostscript. It is unlikely that fltk is responsible since its OpenGL stream is captured and turned into an eps by gl2ps. The one "special" feature of Windows is that all output from saveas() and print() are piped through Ghostscript (even for eps-files). So I'm inclined to conclude it is the version of Ghostscript you are running that is to blame. Ben Thanks. I downloaded and installed Ghostscript 9.07 for Windows. I understood this to be the latest version. Do you know if there is a Ghostscript forum where I can post my problem and seek help? Rick
I think that will complicated. There isn't a good way for those supporting Ghostscript to verify the pipe from Octave to Ghostscript is working correctly. Also we still haven't identified where the "D:\Programs" problem is coming from. Perhaps we should start by verifying the eps-file produced when using the fltk toolkit is ok. Are you able to "print -depsc test.eps"? If so, please attach the eps-file to your reply. Ben
We can also check your Ghostscript by ...
gs -dBATCH -dNOPAUSE -q -sDEVICE=epswrite -sOutputFile=test.eps scdraw.eps I've attached the scdraw.eps. Please email me the test.eps that results. You'll need to replace "gs" with the name of the Ghostscript program you are running. Ben Ben: I’m sorry. I don’t understand what I am to do with the Ghostscript command line you gave me above. Do I enter that in Octave or do I start Ghostscript and enter it there? Rick
You should run that from the command line of the shell which Octave runs in. To be sure, you can run it from Octave by ... [status, output] = system ("gs -dBATCH -dNOPAUSE -q -sDEVICE=epswrite -sOutputFile=test.eps scdraw.eps") However the "gs" needs to be replaced by "gs.exe", "gswin32c.exe", "gswin64c.exe", or "mgs.exe", depending upon what you've installed. Ben Ben: Attached is the test.eps file that resulted from the command line. It looks like it should. Rick |