#Python 2, 294 290
Python 2, 294 290
I got it working, but I still need to golf it more. I'm so happy, though, that was tough (for me, at least)!
I'll probably add an explanation later, unless it's immediately clear to someone...? I kind of doubt it.
n=input()
w=n*n+n+2>>1
a=eval(`[[' ']*w]*-~n**2`)
r=range
j=[i*i+i>>1for i in r(n+1)]
p=0
for i in r(w):
if i in j:
p+=p<n
for k in r(p*p+1):a[~k][i]='+'if k%p<1or' '<a[~k][i-1]<'.'else'|'
else:
for k in r(p*p+1):a[~k][i]=' 'if k%p else'-'
print'\n'.join(''.join(i)for i in a)