Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: sfeam Newsgroups: comp.graphics.apps.gnuplot Subject: Re: 'is it possible' question Followup-To: comp.graphics.apps.gnuplot Date: Thu, 03 May 2012 09:37:41 -0700 Organization: gnuplot development team Lines: 72 Message-ID: References: <2abd4021-f048-43c3-b038-59e6d84da159@z14g2000vbh.googlegroups.com> Reply-To: sfeam@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Thu, 3 May 2012 16:37:44 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="joalffpZlyHxFtpFd/PRrw"; logging-data="8691"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5ffwKGUMtBsEt/z1uOTZW" User-Agent: KNode/4.4.9 Cancel-Lock: sha1:7VIprxqtCP4KWBtculUrva9nhS8= Xref: csiph.com comp.graphics.apps.gnuplot:1071 Conz wrote: > So I managed to come up with the following script after a lot of > tinkering but the way to not plot 0 values does not seem to be > working. > According to an earlier post in this group this should be the way to > do this, does anyone know what I'm doing wrong ? Perhaps what you want is a plot command like the following: do for [timepoint in "1 2 3 4 5 6"] { file = 'plotdata.'.timepoint splot for [type=1:7] file using 1:2:3:(column(4+type)):type \ with points pt 5 pointsize variable lc variable } That will draw a set of colored squares in 3D where the color of the square indicates the "kind" of people in your data and the size of the square is proportional to the number in that column of the data file. The outer loop redraws the plot for the data file corresponding to each timepoint. > Also looking for a way to get a thin line going down to the ground to > show the coords a bit more clearly. You could repeat each plot command using "with impulses" rather than "with points" Ethan > Data is: > x y z v1 v2 > > gnuplot script: > set terminal gif animate delay 200 > set output "output.gif" > set palette > set xrange [0:51] > set yrange [0:51] > set zrange [0:50] > set xlabel 'x' > set ylabel 'y' > set grid xtics ytics > set nokey > set title "1" > splot "./plots/plotdata.1" using 1:2:3:($4 > 0 ? $4 : NaN) with points > palette,"./plots/plotdata.1" using 1:2:3:($5 > 0 ? $5 : NaN) with > points palette > set title "2" > splot "./plots/plotdata.2" using 1:2:3:($4 > 0 ? $4 : NaN) with points > palette,"./plots/plotdata.2" using 1:2:3:($5 > 0 ? $5 : NaN) with > points palette > set title "3" > splot "./plots/plotdata.3" using 1:2:3:($4 > 0 ? $4 : NaN) with points > palette,"./plots/plotdata.3" using 1:2:3:($5 > 0 ? $5 : NaN) with > points palette > set title "4" > splot "./plots/plotdata.4" using 1:2:3:($4 > 0 ? $4 : NaN) with points > palette,"./plots/plotdata.4" using 1:2:3:($5 > 0 ? $5 : NaN) with > points palette > set title "5" > splot "./plots/plotdata.5" using 1:2:3:($4 > 0 ? $4 : NaN) with points > palette,"./plots/plotdata.5" using 1:2:3:($5 > 0 ? $5 : NaN) with > points palette > set title "6" > splot "./plots/plotdata.6" using 1:2:3:($4 > 0 ? $4 : NaN) with points > palette,"./plots/plotdata.6" using 1:2:3:($5 > 0 ? $5 : NaN) with > points palette