couldn't find this: 

I would like to plot a line on X and Y axis that always fits to 100% to the width or height of the figure.

```
figure; hold on;
plot(rand(1,100));
line(xlim,[.5 .5],'Color','red');
line([50 50],ylim,'Color','red');
pause(.5)
xlim([1 200]);% lines should now automatically extend

```

with `grid on` it's possible to get a grid that scales automatically, however it seems impossible to only limit the grid to the X/Y axes. Ideas?

[![bsdf](https://i.stack.imgur.com/ZT4F4.png)](https://i.stack.imgur.com/ZT4F4.png)

after scaling:

[![asdf](https://i.stack.imgur.com/SjfEC.png)](https://i.stack.imgur.com/SjfEC.png)

what I would prefer:

[![enter image description here](https://i.stack.imgur.com/SdIxO.png)](https://i.stack.imgur.com/SdIxO.png)