In Matlab, the plot is to be made such that origin is on top-left corner, x-axis is positive south to the origin, y-axis is positive east to the origin; x-axis is numbered on the left margin and y-axis is labelled on the top margin.
figure();
set(gca,'YAxisLocation','Right','YDir','reverse')
axis([0 10 0 10]);
daspect([1,1,1])
grid on
view([-90 -90])
How to achieve the same in Python? I proceeded like:
import matplotlib.pyplot as plt
plt.figure(1)
plt.axis([40, 160, 0, 0.03])
plt.grid(True)
plt.show()
What is the python equivalent for:
set(gca,'YAxisLocation','Right','YDir','reverse')
daspect([1,1,1])
view([-90 -90])
EDIT:
figure
set(gca,'YAxisLocation','right','XTick',0:15,'YDir','reverse')
axis([0 16 0 16]);
daspect([1,1,1])
hold on
text(2,8,'CHN');
text(8,2,'USA');
view([-90 -90])
Output is:
matplotlib
rather thanpylab
. Could you give your answer in terms ofmatplotlib
or is it same? – Daly