简体   繁体   中英

Octave making plotted objects smaller

Is there a way to make a function I plotted smaller? I have to make this smiley face:1

I created something that somewhat looks like the mouth and the eyebrows the only problem is it's too big.

2

Is there a way I can make it smaller when plotting? This is my code so far:

x = 0:0.1:2*pi;
y = sin(x);
v = [x(:) y(:)];
for i = 0:0.0555555556:0.5
  figure(1);
  plot(x, y+i);
  %plot(x + 1.5, y+i);
  hold on;
  grid on;
  axis([-0.5 6.5 -4 4.5], "square");
endfor

Thanks!

After some experimenting I found that if I write x/2 in plot it will be smaller. plot(x/2, y+i); Thanks for your help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM