Should the phase coefficients of the DFT of a real, even input signal all be zero?
You are right, of course it's not necessary to position the peak of the triangle in the center. The only condition for the DFT of a sequence to be real-valued is that the sequence satisfies

$$x[n]=x^*[N-n],\qquad 0\le n&lt;N\tag{1}$$

where $*$ denotes complex conjugation, and $N$ is the DFT length. If $x[n]$ is real-valued, $(1)$ reduces to

$$x[n]=x[N-n],\qquad 0\le n&lt;N\tag{2}$$

Conditions $(1)$ and $(2)$ require the periodic continuations of $x[n]$ (period $N$) to be even with respect to $n=0$.

From your first figure it appears that your signal satisfies

$$x[n]=x[N-1-n]\tag{3}$$

with $N=15$. Of course this corresponds to a certain symmetry condition, but note that its periodic continuation is not even around $n=0$, as required by $(1)$ and $(2)$.

A simple example of a triangular signal similar to your example but with a purely real-valued DFT (i.e., satisfying $(2)$) is

x = [0 1 2 1]

Its purely real-valued DFT is given by


X = fft(x)
X =

   4  -2   0  -2



What follows is an explanation why the DFT coefficients $X[k]$ are real-valued if (and only if) condition $(1)$ is satisfied. If $X[k]$ is real-valued, we have

$$X[k]=X^*[k]\tag{4}$$

With

$$X[k]=\sum_nx[n]e^{-j2\pi nk/N}\tag{5}$$

where the sum is over one period, i.e., over $N$ adjacent indices, and where we assume that $x[n]$ is continued periodically, such that $x[n]=x[n+N]$. Using Eq. $(5)$ we can write $(4)$ as

$$\begin{align}\sum_nx[n]e^{-j2\pi nk/N}&amp;=\sum_nx^*[n]e^{j2\pi nk/N}\\&amp;=\sum_nx^*[N-n]e^{j2\pi (N-n)k/N}\\&amp;=\sum_nx^*[N-n]e^{j2\pi k}e^{-j2\pi nk/N}\\&amp;=\sum_nx^*[N-n]e^{-j2\pi nk/N}\tag{6}\end{align}$$

where I've used the index transformation $n\rightarrow N-n$, and the fact that $e^{j2\pi k}=1$. From $(6)$, Eq. $(1)$ follows immediately. Note that $(1)$ is dual to the fact that the DFT of a real-valued sequence is conjugate symmetric. In the case we've considered here, we have a conjugate symmetric sequence, leading to a real-valued DFT.