Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1071

Re: 'is it possible' question

From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: 'is it possible' question
Followup-To comp.graphics.apps.gnuplot
Date 2012-05-03 09:37 -0700
Organization gnuplot development team
Message-ID <jnuc8n$8fj$1@dont-email.me> (permalink)
References <f29b062e-1a9f-4447-a23f-0220a1d4506c@d4g2000vbn.googlegroups.com> <2abd4021-f048-43c3-b038-59e6d84da159@z14g2000vbh.googlegroups.com>

Followups directed to: comp.graphics.apps.gnuplot

Show all headers | View raw


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

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

'is it possible' question Conz <consequator@gmail.com> - 2012-05-01 02:53 -0700
  Re: 'is it possible' question Conz <consequator@gmail.com> - 2012-05-03 07:41 -0700
    Re: 'is it possible' question sfeam <sfeam@users.sourceforge.net> - 2012-05-03 09:37 -0700
      Re: 'is it possible' question Conz <consequator@gmail.com> - 2012-05-04 02:10 -0700
        Re: 'is it possible' question sfeam <sfeam@users.sourceforge.net> - 2012-05-04 08:29 -0700

csiph-web