From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63827 Path: news.gmane.org!not-for-mail From: Florian Wobbe Newsgroups: gmane.comp.tex.context Subject: Re: Gnuplot module: Patching of Gnuplot binary still needed? Date: Mon, 22 Nov 2010 20:15:26 +0100 Message-ID: References: <1289772254.13580.44.camel@mattotaupa> <201011152131.18476.peter@affenbande.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1290453358 14064 80.91.229.12 (22 Nov 2010 19:15:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Nov 2010 19:15:58 +0000 (UTC) Cc: Peter Hedwig , eamerritt@gmail.com To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 22 20:15:54 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PKbrl-0001hT-B9 for gctc-ntg-context-518@m.gmane.org; Mon, 22 Nov 2010 20:15:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D2304CA877; Mon, 22 Nov 2010 20:15:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id irKNkFMGJm5Z; Mon, 22 Nov 2010 20:15:46 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 239DCCA873; Mon, 22 Nov 2010 20:15:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 51004CA873 for ; Mon, 22 Nov 2010 20:15:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EowyI3QaTnmW for ; Mon, 22 Nov 2010 20:15:32 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id CF1ECCA870 for ; Mon, 22 Nov 2010 20:15:32 +0100 (CET) Original-Received: from mails3.awi.de (mails3.AWI.DE [134.1.2.14]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAMJFVDE026903 for ; Mon, 22 Nov 2010 20:15:32 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by mails3.awi.de (Postfix) with ESMTP id 1498EC01E8 for ; Mon, 22 Nov 2010 20:15:31 +0100 (MET) X-Virus-Scanned: amavisd-new at awi.de Original-Received: from localhost ([127.0.0.1]) by localhost (mails3.awi.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id UJJ8U3M7fbAQ for ; Mon, 22 Nov 2010 20:15:26 +0100 (MET) Original-Received: from msg.awi.de (msg.AWI.DE [134.1.3.16]) by mails3.awi.de (Postfix) with ESMTP id 585F5C01CF for ; Mon, 22 Nov 2010 20:15:26 +0100 (MET) Original-Received: from vpn-awinet-16-21.awi.de ([unknown] [172.28.16.21]) by msg.awi.de (Sun Java(tm) System Messaging Server 7u3-12.01 64bit (built Oct 15 2009)) with ESMTPSA id <0LCA00CJXW5QST60@msg.awi.de> for ntg-context@ntg.nl; Mon, 22 Nov 2010 20:15:26 +0100 (MET) In-reply-to: X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=134.1.2.14; country=DE; region=03; city=Bremerhaven; latitude=53.5500; longitude=8.5833; http://maps.google.com/maps?q=53.5500,8.5833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08DyjfvXe - 887c2151cd61 - 20101122 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:63827 Archived-At: On Nov 22, 2010, at 16:01 , Mojca Miklavec wrote: > [...] > >> 2) Negative axis labels are set with hyphen instead of proper minus sign, which should be longer (see example above). > > I'm not sure if this should really be fixed automatically or not. In > order to fix this one would have to patch gnuplot core. > > I forgot the details how to do it (I can find it out), but you can > configure the layout of labels. In particular you may enclose the > number into math delimiters ($). Maybe something like > set format y "$%.1f$" > would work (you might want to change the size of left margin then). Hej Mojca, thank you for your answer! Well, that was surprisingly easy - I should have checked the manual first (I was just about to write an ugly hack into your context terminal driver :). Actually set format "$%g$" gives the default label format (only enclosed in $) for all axes. > Doing any other kind of magic would be a bit dangerous. Keep in mind > that > plot 'x.dat' u 1:(2*$2) > will also fail since TeX will interpret $ as math delimiter. But > changing that behaviour would have other undesirable effects. > >> 3) First I thought luatex hangs but then I noticed TikZ is awfully slow when drawing plots with large amounts of data points (the tikzpicture had about 3000 lines). I can speed this up by reducing the size by invoking plot with: >> >> plot "< gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData" using [...] >> >> I wonder if there is a smarter way to do this in gnuplot. > > [...] > What I did for my "theory of chaos" reports and the million-of-points > plots in my thesis was to create an empty plot with ConTeXt terminal, > create a borderless plot with PNG and then manually insert PNG into > the generated ConTeXt output, which you could do with TikZ output as > well. It requires more effort, but there is no other way to speed up > vector graphics. They are simply not suitable for drawing millions of > points on the same plot. I'd probably do the same in that case. But unlike you I have a lot less points - 5000 points instead of millions. Loot at this example, which is the slightly modified random demo script taken from the gnuplot page: set terminal context size 15.0cm,10.5cm standalone set output 'randomCtx.tex' set dummy t,y unset key set parametric set samples 5000, 5000 set style function dots set title "Lattice test for random numbers" set xlabel "rand(n) ->" set xrange [ 0.00000 : 1.00000 ] noreverse nowriteback set ylabel "rand(n + 1) ->" set yrange [ 0.00000 : 1.00000 ] noreverse nowriteback set zlabel "rand(n + 2) ->" set zrange [ 0.00000 : 1.00000 ] noreverse nowriteback plot rand(0), rand(0) set terminal lua tikz context size 15.0cm,10.5cm fulldoc set output 'randomLua.tex' replot Now look at the timing of processing the output files with context (final run only): context randomCtx.tex -> 3.150 seconds. context randomLua.tex -> 23.658 seconds. Further increasing the number of points to 15000 results in 8.978 vs. 62.878 seconds. Quite a big difference in processing time! > (Gnuplot also has a keyword 'every' to reduce the number of points, > but in my case I wanted to plot all of them.) True, but suppose you don't have evenly spaced data points. Then you don't want every other line but one point every 5 kilometres or something the like. Especially for line drawings it would be beneficial not to place every single point. Instead consecutive points should be skipped if they are close to each other (with regard to plot units) - it makes no sense to include points which you won't see anyway. This could be done by defining a grid with a certain (user defined) resolution and rounding the coordinates (plot units) of a line point to the nearest grid node. All consecutive line points falling on the same grid node should not be passed on to terminal drivers. The psxy utility of GMT (http://gmt.soest.hawaii.edu/) does this for instance. I am not aware of such a functionality within gnuplot but it would be a nice feature. Best wishes, Florian ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________