|
From: Tatsuro M. <tma...@ya...> - 2014-08-25 07:41:11
|
----- Original Message ----- > From: GOO Creations > To: gnu...@li... > Cc: > Date: 2014/8/25, Mon 16:07 > Subject: [Gnuplot-info] Step function not starting at absolute 0 > > Hi all, > > I'm trying to create a simple step function. I have this weird problem that > the x-values of my function do not start at absolute 0, therefore creating a > skew function. Here is my code: > > /set xzeroaxis lc "black"// > //set yzeroaxis lc "black"// > //set terminal pdf// > //set output "step.pdf"// > //f(x)= x <= 0 ? -1 : 1// > //plot f(x) lw 2 lc "black"// > / > > > I've also attached the output PDF. As you can see the middle part of the > function is not parrallel with the y-axis. Does anyone know what I'm missing > > Chris This is not strange because the sampling points in x axis is a finite number. (default 100). Increasing sample number like "set sample 1000", the appearance will be better but that is the results mere approximation will be better. Tatsuro |