473,231 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

How do i scale my axes in matplotlib?

I'm using matplotlib to generate (and save) plots of bandwidth data
from simulation logs. Since the simulations are of varying lengths, i
need a way to scale the axes so that every 100,000 points on the
X-axis are roughly equal to the height of the Y-axis. In other words,
if my X data varied from 0 to 575,000, my aspect ratio would be
roughly 6:1. If X goes from 200,000 to 400,000, then the aspect ratio
should be 2:1.

I've looked through the manuals, but i can't find out how to do
this. The 'axis' and 'axes' methods looked promising, but don't seem
to let me set an aspect ratio of the axes. Anyone know how to do this?

tia,
Eric
Dec 22 '07 #1
1 4617
On Dec 22, 5:42 pm, Eric Holbrook <eholbr...@austin.rr.comwrote:
I'm using matplotlib to generate (and save) plots of bandwidth data
from simulation logs. Since the simulations are of varying lengths, i
need a way to scale the axes so that every 100,000 points on the
X-axis are roughly equal to the height of the Y-axis. In other words,
if my X data varied from 0 to 575,000, my aspect ratio would be
roughly 6:1. If X goes from 200,000 to 400,000, then the aspect ratio
should be 2:1.

I've looked through the manuals, but i can't find out how to do
this. The 'axis' and 'axes' methods looked promising, but don't seem
to let me set an aspect ratio of the axes. Anyone know how to do this?

tia,
Eric
You should look at the matplotlib examples :
There is one called "equal_aspect_ratio.py"

http://matplotlib.sourceforge.net/ma..._0.91.2svn.zip
Dec 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Hunter | last post by:
matplotlib is a 2D plotting package for python with a matlab compatible syntax and output tested under linux and windows platforms. matplotlib-0.30 is available for download at...
2
by: monkeyboy | last post by:
Hello, I'm searching for a plotting package that will allow multiple y axes of different scales. For example I'd like to overlay 4 or 5 time series with each series having a separate axis. Does...
5
by: John Henry | last post by:
I've been asking this question at the matplotlib user list and never gotten an answer. I am hoping that there are matplotlib users here that can help. My problem with matplotlib's way of...
3
by: vajratkarviraj | last post by:
i hav python2.5, matplotlib0.90.1, and py2exe for python 2.5 all on windows xp... i hav a python program(letsc.py) which uses the matplotlib package... and i want 2 make an exe of it for distribution...
0
by: Rominsky | last post by:
I am trying to use the fill command to draw a box around an object in an image. I can get the box drawn, but there seems to be a side effect. The fill command is adding white lines to the top and...
4
by: John Henry | last post by:
Has anybody been able to create an exe of their python applications involving matplotlib using pyinstall (ver 1.3)? I am getting a: RuntimeError: Could not find the matplotlib data files when...
0
by: PamMish1982 | last post by:
Hi all, I have recently started using Python and I am trying to make a GUI out of Tkinter. I am using matplotlib for the graphic purposes. I have to make a exe file from this code. I use py2exe...
2
by: DaveD170 | last post by:
Hi everybody, I'm newbie in c# and I'm having trouble in creating an excel chart. I have vector of data that my program calculated. It's in the next format: X Y 0.1 100 0.2 90...
3
by: afrogazer | last post by:
I am creating a wind rose using a polar bar plot bu the points do not seem to align to the correct angles. Here is the sample code I am using. I can't seem to see anything in the API on how to set...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.