help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identify auto tick locations


From: Francesco Potorti`
Subject: Re: Identify auto tick locations
Date: Thu, 01 Nov 2007 01:01:08 +0100

>IANAL, but I think this makes your code a derivative of gnuplot, so
>subject to its license, which is unfortunately a bit murky when it
>comes to what it might mean to distribute code that is derived from
>the gnuplot sources.

If that is the problem, one just needs to rewrite the code, for example
by vectorising it instead of using elseif statements.  Writing code that
works like someone else's (copying the algorithm) but that is written in
a  different way is not copyright infringement.

This one:
[0.05 0.1 0.2 0.5 1 2 ceil(dnorm)](find(posns > [40 20 10 4 2 0.5 -Inf])(1))

should be equivalent to this one:
if (posns > 40)
   tics = 0.05;
elseif (posns > 20)
   tics = 0.1;
elseif (posns > 10)
   tics = 0.2;
elseif (posns > 4) 
   tics = 0.5;
elseif (posns > 2) 
   tics = 1; 
elseif (posns > 0.5) 
   tics = 2; 
else
   tics = ceil(dnorm);
end

Okay, it is far less readable...

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
Web: http://fly.isti.cnr.it/           Key:   fly.isti.cnr.it/public.key


reply via email to

[Prev in Thread] Current Thread [Next in Thread]