|
From: Jon <dev...@gm...> - 2010-11-18 21:44:09
|
Thank you very much for your interesting code! But the interpretation on the
code is a bit beyond my capability. Here are some questions and I would be
very glad if there are further explanations.
(1) what is $0? I only know there is $1,$2, ...
(2) is t=t."," , t=t." '".stringcolumn(2)."' ".stringcolumn(1) , $1
the other alternative for $0==0?
Does t=t."," , t=t." '".stringcolumn(2)."' ".stringcolumn(1) , $1 actually
mean three separate commands?
t=t."," ,
t=t." '".stringcolumn(2)."' ".stringcolumn(1) ,
$1
(3) What's the use of the final $1 in the above command? It does not help
building t, so does it just help to set up the table?
(4) Actually the purpose of set table is to construct the macro t, is it? If
the case, is there way to suppress the creation of the table? I mean, can
there be no output except for generating t?
Sincerely,
Jon
On Thu, Nov 18, 2010 at 1:58 PM, Thomas Sefzick <t.s...@fz...>wrote:
>
> set macro
> set table
> t="("
> plot 'aaa.txt' using ($0==0?t=t:t=t."," , t=t." '".stringcolumn(2)."'
> ".stringcolumn(1) , $1):3
> t=t.")"
> unset table
> set xtics @t
> plot 'aaa.txt' using 1:3
>
> pause -1
>
> set table
> t="("
> plot 'aaa.txt' using ($0==0?t=t:t=t."," , t=t."
> '".stringcolumn(1)."\n".stringcolumn(2)."' ".stringcolumn(1) , $1):3
> t=t.")"
> unset table
> set xtics @t
> set bmargin 3
> plot 'aaa.txt' using 1:3
>
>
> bsmile wrote:
> >
> > Hello,
> >
> > Suppose I have the following data file, aaa.txt,
> >
> > 1 A 0.1
> > 2 B 0.5
> > 3 C 0.23
> > 4 D 0.4
> > 5 E 0.32
> > 6 F 0.9
> >
> > and I want to use the second column to display at each xtics and replace
> > the
> > numbers, so that I get
> >
> > |
> > | graph displayed here
> > -----------------------------------------------
> > A B C D E F ...
> >
> > Or even further
> >
> > |
> > | graph displayed here
> > ---------------------------------------------
> > 1 2 3 4 5 . ....
> > A B C E F ....
> >
> > Is there way to realize these effects?
> >
> > Thanks!
> >
> > Sincerely,
> > Jon
> >
> ------------------------------------------------------------------------------
> > Beautiful is writing same markup. Internet Explorer 9 supports
> > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> > Spend less time writing and rewriting code and more time creating great
> > experiences on the web. Be a part of the beta today
> > http://p.sf.net/sfu/msIE9-sfdev2dev
> > _______________________________________________
> > gnuplot-info mailing list
> > gnu...@li...
> > https://lists.sourceforge.net/lists/listinfo/gnuplot-info
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/how-to-set-xtics-using-character-strings-saved-in-a-file-tp30245934p30250534.html
> Sent from the Gnuplot - User mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today
> http://p.sf.net/sfu/msIE9-sfdev2dev
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
|