Q:

How to draw a graph with vertical lines of fixed height at several points

Basically, I want to draw a graph whose x axis varies from -10 to 10, and the y axis varies from 0 to 10.  The graph has vertical lines of height 4 at x = -1 and x = 1. 
(I guess, it is a bar graph with infinitely thin bars)

A:

You can for example cheat with the stem function
stem([-1 1],[4 4],'Marker','none');

