From crislato at gmail.com Thu Nov 12 19:23:20 2009 From: crislato at gmail.com (Christian D. Latorre) Date: Thu, 12 Nov 2009 19:23:20 -0500 Subject: [Tioga-users] Tioga graphs in a RoR app Message-ID: <4089aeba0911121623g588775e7va2ab47f1ca973b0d@mail.gmail.com> Hi all. Well, I'm developing an app using Ruby on Rails and I want to generate some plots using Tioga. This is the situation: I have TEXT fields in a MySQL database filled with a 512-lines plain text file (each line is a number, ex: 501234) I want to generate a pdf from the data in a TEXT field just after filling a web form in the RoR app web interface... Any ideas of how to parse and process the data in the TEXT field to generate a scatter plot with Tioga? Thanks, -- Christian D. Latorre -------------- next part -------------- An HTML attachment was scrubbed... URL: From mblock at physics.ucsb.edu Sun Nov 15 18:16:50 2009 From: mblock at physics.ucsb.edu (Matt Block) Date: Sun, 15 Nov 2009 15:16:50 -0800 Subject: [Tioga-users] rendering_mode with show_marker Message-ID: <461AAD14-1F93-4ECC-ADE1-1854E560B7F1@physics.ucsb.edu> Hi, I'm trying to use the dictionary entry 'rendering_mode' for the show_marker function and, in particular, I'm trying to use of one the clipping modes. The first marker I attempt to show clipped doesn't appear clipped, but rather filled, and then no subsequent markers show at all on my plot even if I specify the rendering mode to FILL. No errors are popping up at runtime so I'm thoroughly confused. Any thoughts? Matt From paxton at kitp.ucsb.edu Sun Nov 15 19:12:39 2009 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Sun, 15 Nov 2009 16:12:39 -0800 Subject: [Tioga-users] rendering_mode with show_marker In-Reply-To: <3F037F0C-5674-4C17-8ECF-D129B6F69C2F@physics.ucsb.edu> References: <461AAD14-1F93-4ECC-ADE1-1854E560B7F1@physics.ucsb.edu> <169EE202-E4FB-42F3-8AC2-D144D8054943@kitp.ucsb.edu> <3F037F0C-5674-4C17-8ECF-D129B6F69C2F@physics.ucsb.edu> Message-ID: Hi Matt, Thanks for sending all the necessary files. Turns out that the clipping from the marker is "sticky" in the sense that it sticks around after the show_marker call. The work-around is to put the call on show_marker inside a t.context -- something like this: def show1_fill_and_clip(x,y,color,scale) t.context do t.show_marker('at' => [ x, y ], 'marker' => Circle, 'scale' => scale, 'rendering_mode' => FILL_AND_CLIP, 'stroke_color' => color, 'fill_color' => color) end end When context returns it restores the previous graphics state, including the clipping. -------------- next part -------------- A non-text attachment was scrubbed... Name: disp_3x6_6_Jp1_K4.rb Type: text/x-ruby-script Size: 5460 bytes Desc: not available URL: -------------- next part -------------- Cheers, Bill From paxton at kitp.ucsb.edu Sun Nov 15 18:36:11 2009 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Sun, 15 Nov 2009 15:36:11 -0800 Subject: [Tioga-users] rendering_mode with show_marker In-Reply-To: <461AAD14-1F93-4ECC-ADE1-1854E560B7F1@physics.ucsb.edu> References: <461AAD14-1F93-4ECC-ADE1-1854E560B7F1@physics.ucsb.edu> Message-ID: <169EE202-E4FB-42F3-8AC2-D144D8054943@kitp.ucsb.edu> Hi Matt, Why don't you send me the script so I can try to reproduce the problem. Thanks, Bill On Nov 15, 2009, at 3:16 PM, Matt Block wrote: > Hi, > > I'm trying to use the dictionary entry 'rendering_mode' for the > show_marker function and, in particular, I'm trying to use of one > the clipping modes. The first marker I attempt to show clipped > doesn't appear clipped, but rather filled, and then no subsequent > markers show at all on my plot even if I specify the rendering mode > to FILL. No errors are popping up at runtime so I'm thoroughly > confused. Any thoughts? > > Matt > _______________________________________________ > Tioga-users mailing list > Tioga-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/tioga-users From edder at tkwsping.nl Mon Nov 23 10:29:18 2009 From: edder at tkwsping.nl (Edder) Date: Mon, 23 Nov 2009 16:29:18 +0100 Subject: [Tioga-users] Different xaxis location Message-ID: Hi all, I remember asking this question a long time ago, but can't find the details anymore (I think I was told it was possible, but not how). I would like to plot the xaxis at y=0 instead of at the bottom of the plot. Is this possible? And if so how? Cheers, Edwin P.S. Still a happy tioga user From paxton at kitp.ucsb.edu Mon Nov 23 12:17:57 2009 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Mon, 23 Nov 2009 09:17:57 -0800 Subject: [Tioga-users] Different xaxis location In-Reply-To: References: Message-ID: <2EAA9603-4155-416A-953B-B8C83268C7CC@kitp.ucsb.edu> Hi Edwin, You should get some ideas by looking at the code for Axes_fun in samples/plots/plots.rb: -------------- next part -------------- A non-text attachment was scrubbed... Name: Axes_fun.pdf Type: application/pdf Size: 15927 bytes Desc: not available URL: -------------- next part -------------- Cheers, Bill btw: thanks to Vincent for the tools to do these things with axes. On Nov 23, 2009, at 7:29 AM, Edder wrote: > Hi all, > > I remember asking this question a long time ago, but can't find the > details anymore (I think I was told it was possible, but not how). > > I would like to plot the xaxis at y=0 instead of at the bottom of the > plot. Is this possible? And if so how? > > Cheers, Edwin > > P.S. Still a happy tioga user > _______________________________________________ > Tioga-users mailing list > Tioga-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/tioga-users From jdrs at physics.ucsb.edu Mon Nov 23 14:48:56 2009 From: jdrs at physics.ucsb.edu (Justin D. R. Steinfadt) Date: Mon, 23 Nov 2009 11:48:56 -0800 Subject: [Tioga-users] Converting PDFs to EPSs In-Reply-To: <2EAA9603-4155-416A-953B-B8C83268C7CC@kitp.ucsb.edu> References: <2EAA9603-4155-416A-953B-B8C83268C7CC@kitp.ucsb.edu> Message-ID: <4B0AE728.3060309@physics.ucsb.edu> Not strictly a Tioga question, however, I am using several Tioga plots in a paper I wish to submit soon to a journal that requires EPS formated graphics. Does anyone have suggestions for converting the PDFs that Tioga outputs to the EPS format? I have been using the "convert" command on my Mac, but it seems to produce somewhat "fuzzy" figures when viewed with Preview. Further, when embedded into documents using LaTeX, Adobe Reader presents them in a very splotchy and under-resolved fashion. Thanks, -Justin Steinfadt From paxton at kitp.ucsb.edu Mon Nov 23 15:17:21 2009 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Mon, 23 Nov 2009 12:17:21 -0800 Subject: [Tioga-users] Converting PDFs to EPSs In-Reply-To: <4B0AE728.3060309@physics.ucsb.edu> References: <2EAA9603-4155-416A-953B-B8C83268C7CC@kitp.ucsb.edu> <4B0AE728.3060309@physics.ucsb.edu> Message-ID: <8F0E5F03-5022-4DCE-BAF1-747B86E9BA4C@kitp.ucsb.edu> Hi, The Tioga tutorial link to Doppdftoeps seems to be dead now. You might try using my version to see if it works for you (it still works on my mac). -------------- next part -------------- A non-text attachment was scrubbed... Name: Droppdftoeps.app.zip Type: application/zip Size: 27018 bytes Desc: not available URL: -------------- next part -------------- Alternatively, you might want to get a copy of GraphicConverter: http://www.lemkesoft.com/ it is a very handy tool to have. Cheers, Bill On Nov 23, 2009, at 11:48 AM, Justin D. R. Steinfadt wrote: > Not strictly a Tioga question, however, I am using several Tioga > plots in a paper I wish to submit soon to a journal that requires > EPS formated graphics. > > Does anyone have suggestions for converting the PDFs that Tioga > outputs to the EPS format? I have been using the "convert" command > on my Mac, but it seems to produce somewhat "fuzzy" figures when > viewed with Preview. Further, when embedded into documents using > LaTeX, Adobe Reader presents them in a very splotchy and under- > resolved fashion. > > Thanks, > -Justin Steinfadt > _______________________________________________ > Tioga-users mailing list > Tioga-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/tioga-users From fourmond at gmail.com Mon Nov 23 16:33:46 2009 From: fourmond at gmail.com (Vincent Fourmond) Date: Mon, 23 Nov 2009 22:33:46 +0100 Subject: [Tioga-users] Converting PDFs to EPSs In-Reply-To: <4B0AE728.3060309@physics.ucsb.edu> References: <2EAA9603-4155-416A-953B-B8C83268C7CC@kitp.ucsb.edu> <4B0AE728.3060309@physics.ucsb.edu> Message-ID: <4B0AFFBA.2020803@gmail.com> Hello ! Justin D. R. Steinfadt wrote: > Not strictly a Tioga question, however, I am using several Tioga plots > in a paper I wish to submit soon to a journal that requires EPS formated > graphics. > > Does anyone have suggestions for converting the PDFs that Tioga outputs > to the EPS format? I have been using the "convert" command on my Mac, > but it seems to produce somewhat "fuzzy" figures when viewed with > Preview. Further, when embedded into documents using LaTeX, Adobe > Reader presents them in a very splotchy and under-resolved fashion. I'd suggest you try pdftops (from the xpdf package), with a command-line in the spirit of: pdftops -eps -paper match stuff.pdf stuff.eps (this is what ctioga is doing when you feed him the --eps option). That would be worth adding to the FAQ, I'll do that in a minute. Cheers, Vincent -- The Librarian was, of course, very much in favour of reading in general, but readers in particular got on his nerves. -- Terry Pratchet, Men at arms Vincent, not listening to anything for now From jeanjulien.fleck at gmail.com Mon Nov 23 16:41:14 2009 From: jeanjulien.fleck at gmail.com (Fleck Jean-Julien) Date: Mon, 23 Nov 2009 22:41:14 +0100 Subject: [Tioga-users] Tioga graphs in a RoR app In-Reply-To: <4089aeba0911121623g588775e7va2ab47f1ca973b0d@mail.gmail.com> References: <4089aeba0911121623g588775e7va2ab47f1ca973b0d@mail.gmail.com> Message-ID: Hello Christian, It has been a long time I've touched neither rails nor tioga but I hope it could be of some help. > Christian D. Latorre : > Hi all. > Well, I'm developing an app using Ruby on Rails and I want to generate some > plots using Tioga. This is the situation: > I have TEXT fields in a MySQL database filled with a 512-lines plain text > file (each line is a number, ex: 501234) > I want to generate a pdf from the data in a TEXT field just after filling a > web form in the RoR app web interface... > Any ideas of how to parse and process the data in the TEXT field to generate > a scatter plot with Tioga? I used to write a rail application to visualize the results of my nbody simulations. They were stored in ASCII files and I generated a graph using ctioga but there was the idea: I had a viewer which, when pressing the submit button, called a controller method. This method was designed to read the simulation file specified in the html form and call ctioga to generate a graph from options also specified in the html form by constructing the adequate command line. I suppose that in your case, the controller could simply put your data from the MySQL base into Dvectors so that you could use them to make the scatter plot using Tioga. I think tioga has a way to ask ruby to actually make the pdf so that you just have to transform that pdf into a png file (using for example convert or Vince's script 'pdf2web' http://sciyag.rubyforge.org/svn/trunk/SciYAG/www/pdf2web) and ask your viewer to display this image. I'm sure there are cleverer ways to do it rather than use "system" calls, but it's at least a beginning. Cheers, -- JJ Fleck PCSI1 Lyc?e Kl?ber From diehl at alumni.cmu.edu Tue Nov 24 20:50:58 2009 From: diehl at alumni.cmu.edu (Chris Diehl) Date: Tue, 24 Nov 2009 17:50:58 -0800 Subject: [Tioga-users] Problem Installing Tioga Message-ID: <62bdf6680911241750x2544a365la7b257ed1d408de1@mail.gmail.com> Hello, Today I attempted to install Tioga for use with Ruby 1.9 on my Macbook Pro running Leopard. Unfortunately I was not successful. When executing 'ruby extconf.rb', I saw the following: checking for zlib.h... yes checking for compress() in -lz... yes checking for ieee754.h... no You lack the ieee754.h header file, which might mean lower reliability when Marshalling Dvectors and Dtables checking for isnan() ... no MacOS specific installation /Users/cpd/tioga-1.11/split/mkmf2.rb:557:in `gsub!': can't modify frozen string (RuntimeError) from /Users/cpd/tioga-1.11/split/mkmf2.rb:557:in `block in declare_file_set' from /Users/cpd/tioga-1.11/split/mkmf2.rb:549:in `each' from /Users/cpd/tioga-1.11/split/mkmf2.rb:549:in `declare_file_set' from /Users/cpd/tioga-1.11/split/mkmf2.rb:497:in `declare_exec' from extconf.rb:113:in `
' Any thoughts on what might be the issue here? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: