transforming coordinates in matplotlib
I'm trying to plot a series of rectangles and lines based on a tab delimited text file in matplotlib. The coordinates are quite large in the data and shown be drawn to scale -- except scaled down by some factor X -- in matplotlib.
What's the easiest way to do this in matplotlib? I know that there are transfo开发者_StackOverflow社区rmations, but I am not sure how to define my own transformation (i.e. where the origin is and what the scale factor is) in matplotlib and have it easily convert between "data space" and "plot space". Can someone please show a quick example or point me to the right place?
If you simply use matplotlib's plot function, the plot will fit into one online window, so you don't really need to 'rescale' explicitly. Linearly rescaling is pretty easy, if you include some code sample to show your formatting of the data, somebody can help you in translating the origin and scaling the coordinates.
精彩评论