Gain in dB scale of the transmitting antenna is:
$$G=10\cdot\log \frac{P_o}{P_i}$$
The input power will always be larger than the output power. However, I see a lot of radiation pattern graphs with positive gains in dB. How is that possible? Shouldn't the gain value ALWAYS be negative as the power ratio P_o\P_i will always be less than zero?