Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!y7g2000vbx.googlegroups.com!not-for-mail From: Conz Newsgroups: comp.graphics.apps.gnuplot Subject: Re: 'is it possible' question Date: Fri, 4 May 2012 02:10:57 -0700 (PDT) Organization: http://groups.google.com Lines: 48 Message-ID: <097bf1f6-c31a-4881-b9ae-3eb62328be2d@y7g2000vbx.googlegroups.com> References: <2abd4021-f048-43c3-b038-59e6d84da159@z14g2000vbh.googlegroups.com> NNTP-Posting-Host: 83.136.195.18 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1336122657 20735 127.0.0.1 (4 May 2012 09:10:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 4 May 2012 09:10:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y7g2000vbx.googlegroups.com; posting-host=83.136.195.18; posting-account=u1PGoQoAAAB3Yysowr30pEylJ43kw9bw User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0,gzip(gfe) X-Received-Bytes: 3214 Xref: csiph.com comp.graphics.apps.gnuplot:1075 On 3 mei, 18:37, sfeam wrote: > 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 That was almost perfect :-) I was confused by the first column showing up as single pixels but when trying to type out something here about what the splot line was doing I figured out that its doing 4 + type, and the first 'type' variable is 1 so it was checking column 5 and up, not 4 and up. I also took out the 'lc variable' because that was making each point a different color instead of colored per column. As a last thing I am now trying to get the legend to be more descriptive then a wall of parameter text, I ran into sprintf but 'title sprintf("Type: ",type)' does not seem to work and will produce a column of just "Type:" as a legend when put in the splot line in front of 'with'. Also, would it be possible to force a 'type' to be a specific color ? Thanks so far, those few lines of code have been of great help :-)