Message Boards Message Boards

0
|
2811 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Rotating or Transposing Graphics[] Axes

Posted 10 years ago
Is there any way to rotate or transpose axes in Graphics[]?

I wanted to do a simple plot of lines between some European cities. Getting their lat-long coordinates from CityData[] makes this easy, but those pairs come back as {Lat, Long}, and if I plot them as lines using Graphics[], latitude ends up being the horizontal axis, and longitude the vertical axes. So the plot looks wrong to anyone who has got used to "North at the top, East to the right".

Yes, I could swap the pairs of each list if I wanted, but it would be better to be able to rotate or transpose the Graphics[] axes.

Thanks in advance.

Brad
POSTED BY: Brad Varey
I don't think there's something that does this. It's not something I've seen in other plotting libraries either. This is probably because it's easier to orient the data correctly before givining it to the plotter:

mydata = {{y,x},{y,x},{y,x},{y,x},......}

Reverse/@mydata
{{x,y},{x,y},{x,y},{x,y}......}
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract