Octave Plots


1. Grundlagen


Plot löschen
clearplot


Clear current figure
clf


Beschriftung
plot(x, y,";Beschriftung;");


2. Fromatierung


plot(x, y,"2;Beschriftung;3");


plot(x, y,"1");


	      Number  Gnuplot colors  (lines)points style
	        1       red                   *
	        2       green                 +
	        3       blue                  o
	        4       magenta               x
	        5       cyan                house
	        6       brown            there exists




3. Hinweise


Wenn vielen Figures gezeichnet werden, verhält sich OCATVE anders als MATLAB
grid on   % Bei octave besser explizit grid on anstelle von grid anngeben



4. Output plot to file


> gset terminal png
> gset output "1.png"
> redraw

png, emf, postscript




5. Beispiele



Ordentlicher Plot
figure(1)
x=linspace(-1.5,1.5,50);
y1=exp(x);
y2=exp(-x);
y3=1-exp(-x);
y=[y1;y2;y3];
hold off
plot(x,y);
legend('y_1','y2','y3');
xlabel('x');
ylabel('y');
title('Exponentialfunktion')
grid on  







Siehe auch
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki