|
From: Lars H. <la...@ho...> - 2007-02-06 09:33:47
|
Hello!
> I made the datafile of following format:
>
> 1(A) 45
> 2(S) 36
> 3(G) 63
>
> Number in the parenthesis in the first column denotes the
> index no. of amino acid residues- A,S,G. This way I have
> been able to plot the graphs where 1,2,3 are printed on
> the x-axis, but I want A,S,G to be printed on the x-axis
> rather than the numbers. How can this be achieved with
> Gnuplot?
I would do it like follows. The datafile should be like this
(three columns):
1 A 45
2 S 36
3 G 63
Now I plot column 3 over column 1
plot "datafile" using 1:3
Since gnuplot is not able to use the information of column 2
for the tic markers of the x-axis, I would set them
manually
set xtics ("A" 1, "S" 2, "G" 3)
This produces three tics at the positions 1, 2 and 3 named
A, S and G. There are more options for manually set xtics,
especially font types or rotating text (depends on the
terminal abilities); see "help xtics". If you wuold like
to set also minor tics, see "help mxtics".
Before others accuse me: There are ways of using the second
columns textkind information for the xtics automatically.
Most of the solutions I saw for this problem were very
complicated and depended on the help of external
programmes.
Regards
Lars
|