From St. Andrew's Square, it is only a short walk north to Queen Street, where you will find the Scottish National Portrait Gallery on the corner.
It is a short walk from St. Andrew Square to the Scottish National Portrait Gallery.  