Hi Thomas,
thank u for your answer. With this script gnuplot is 'only' writing the
first xtic label. And i also didn't understand what u have done, can u
explain your script a bit please.
One more question is: Is there also a possibility that gnuplot will display
all others when i zoom in like it is in default done by gnuplot when it sets
the xtics self?
Thanks
Thomas Sefzick wrote:
>
> plot twice (1st plot to construct the 'set xtics' command):
>
> set macro
> set style data histogram
> set style histogram cluster gap 1
> set style fill solid
> set boxwidth 1.0
> set xtic rotate by -45
> set table
> a="set xtics ("
> plot "datafile" using ( \
> int($0)%100==0&&int($0)>0?a=a.",":0 , \
> int($0)%100==0?a=a."\"".stringcolumn(1)."\" ".stringcolumn(0):0 , \
> $2 \
> )
> a=a.")"
> print a
> @a
> unset table
> plot "datafile" using 2 title "test"
>
>
> Ates80 wrote:
>>
>> Hi all,
>>
>> i hope someone can help me. I have the following problem and could not
>> find a solution for that in the forum yet.
>> I want to plot my data file with histograms and my own xtic labels and i
>> have about 1000 rows. So if i plot my xaxes labels become unclear
>> because of the amount of rows. I could set the xtics increment to e.g 100
>> with "set xtics 100" but this doesn't work when i'm using my own labels.
>> How can i tell gnuplot that he shall only set every e.g. 100th label?
>>
>> My data file looks like this:
>> #range(as string) number
>> 0-100 90
>> 100-200 80
>> 200-300 70
>> 300-400 20
>> ...
>>
>> And my script is like that so far:
>> reset
>> set title "my histogram result"
>> set yrange [0:700]
>> set style data histogram
>> set style histogram cluster gap 1
>> set style fill solid
>> set boxwidth 0.9
>> set xtic rotate by -45
>> set xtics 100
>> plot "datafile" u 2:xtic(1) t 'test'
>>
>>
>
>
--
View this message in context: http://old.nabble.com/How-to-set-xtics-for-own-labels-tp32212388p32223843.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|