Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1077
| 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-04 08:29 -0700 |
| Organization | gnuplot development team |
| Message-ID | <jo0sle$u24$1@dont-email.me> (permalink) |
| References | <f29b062e-1a9f-4447-a23f-0220a1d4506c@d4g2000vbn.googlegroups.com> <2abd4021-f048-43c3-b038-59e6d84da159@z14g2000vbh.googlegroups.com> <jnuc8n$8fj$1@dont-email.me> <097bf1f6-c31a-4881-b9ae-3eb62328be2d@y7g2000vbx.googlegroups.com> |
Followups directed to: comp.graphics.apps.gnuplot
Conz wrote:
> On 3 mei, 18:37, sfeam <sf...@users.sourceforge.net> 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.
>> 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.
Oops. Sorry. To use the type as a fixed color that command should have
been ... using 1:2:3:(column(4+type)):(type)
where "(type)" in parentheses is evaluated once, giving a constant value,
instead of "type" with no parentheses which is interpreted as a column
number containing the color value.
>
> 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'.
These are C-language formats.
So sprintf("Type: %d",type)
> Also, would it be possible to force a 'type' to be a specific color ?
See above.
Or else use type as a parameter to a function that returns
a color value.
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
'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