As you can see tan and cot have their asymptotes in different places which affects how they are drawn. However they both follow the same positive negative pattern according to the unit circle. Since tan has an asymptote at pi where tan is positive the graph must follow close to the asymptote without reaching the x axis which it can only active by going towards positive infinite but then the same graph has to be negative in the next quadrant over with the asymptote being at 2pi so the graph would have to reach towards negative infinity while going along the asymptote. Because of this the tan graph must go follow that shape. The same goes for cot but since the asymptotes are in different places in relation to the positive negative pattern the graph must go towards negative infinity along the first asymptote and towards positive infinity along the second asymptote which will give it the shape it has.