Anirban Gangopadhyay <gangopadhyay.anirban <at> gmail.com> writes:
>
> Hi,
>
> I used the following simple gnuplot script written below :
>
> set terminal postscript enhanced color 'Helvetica' 20
> p(x,y,n1,n2) = log10((x**n1) * (abs(y)**n2)) + log10(x)
> q(x,y,n1,n2) = log10((x**n1) * x * (abs(y)**n2))
> set output 'plot499.ps'
> plot 'tsorted499diffVsB.dat' u (p(499,$1,3,0.66)):(p(499,$5,2,1)) every
> ::27::44 w p ls 1 t 'N=499(add)', 'tsorted499diffVsB.dat' u
> (q(499,$1,3,0.66)):(q(499,$5,2,1)) every ::27::44 w p ls 2 t
> 'N=499(multiply)'
> set terminal x11
>
> Note that the functions p and q are the same function using the idea that
> log(product of two numbers) = sum of log of the two numbers, but the plot
> command does not result in overlapping plots. I have attached the data
> file 'tsorted499diffVsB.dat' and the output file 'plot499.ps' here. Any
> help/clue as to what might be happening here will be appreciated.
>
> Anirban
if your numbers get too large,
log10(x)+log10(y)
will work perfectly, but
log10(x*y)
will fail because x*y is out of range.
maybe this is happening with your data?
|