So recently, I asked this question on Math.SE on if my thought process on how to solve the limit $\lim_{x\to(\pi/2)^-}\tan(x)^{\cos(x)}$ was correct, and actually, while I was solving this, I was trying to plot the imaginary part of said equation in Mathematica for practice.
I do have code for plotting the real-value part
Plot[Tan[x]^Cos[x],{x,-5,5}]
which does work as intended, however I'm confused as to how to get the imaginary plot of this function.
I have tried using
ComplexPlot[Tan[x]^Cos[x],{x,-5,5}]
but it returns the following errors:
ComplexPlot: Corners for x in {x,-5,5} must have distinct machine-precision real and imaginary parts.
ComplexPlot: Corners for x in {x,-5,5} must have distinct machine-precision real and imaginary parts.
ComplexPlot: Corners for x in {x,-5,5} must have distinct machine-precision real and imaginary parts.
General: Further output of ComplexPlot::plld will be suppressed during this calculation.
ComplexPlot: Corners for x in {x,-5,5} must have distinct machine-precision real and imaginary parts.
ComplexPlot: Corners for x in {x,-5,5} must have distinct machine-precision real and imaginary parts.
Out[6]= ComplexPlot[Tan[x]^Cos[x],{x,-5,5}]
I managed to fix this by adding an imaginary part to my bounds (my current code so far)
ComplexPlot[Tan[x]^Cos[x],{x,-5-5i,5+5i}]
which returns this
which looks cool, but it's not what I'm trying to do.
What I'm trying to do is this is plot the imaginary part of $\tan(x)^{\cos(x)}$ on the $xy$-plane like this (ignore the blue line):
although I don't know how to fix my code from here. So my question is: