473,383 Members | 1,997 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,383 software developers and data experts.

Matlab axis control problem - solved

I don't understand my earlier problem but the following code works no
matter what the ylim is set to:

I reworked the example major_minor_demo1.py to find the answer.

thanks
Dick C

ps: I still can't post a reply since I read the list with my mozilla or
konqueror browser and email separately with thunderbird - the reply
address is not obvious.

from pylab import *
from matplotlib.ticker import MaxNLocator, MultipleLocator,
FormatStrFormatter

x=[10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0]
y=x
figure(1)
ax=subplot(111)
ax.plot(array(x), array(y), 'x')

ymajorLocator = MultipleLocator(5)
ymajorFormatter = FormatStrFormatter('%d')

ax.set_yscale('log')

ax.set_ylim(18.0, 58.0)

ax.yaxis.set_major_locator(ymajorLocator)
ax.yaxis.set_major_formatter(ymajorFormatter)

ax.yaxis.grid(True, linestyle='-', which='major')
show()

Oct 17 '07 #1
0 1131

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: Mathias | last post by:
Dear NG, I currently ty to switch from matlab to python/scipy but have a lot of trouble with images. What I need is a function for subsequently displaying a number of 2D-matrices as an image. I...
6
by: Lars Christiansen | last post by:
Hi! I am a master student in (geo)physics at the University of Copenhagen and part of a study group on C++ as a scientific programming language. I, and the other students in the group, have...
9
by: Carl | last post by:
I am desperately looking for a way to call Python from Matlab. I have become used to Python's rich syntax and large number of libraries, and feel ridiculously clumsy being stuck with Matlab's...
2
by: Binod Pant | last post by:
Does any one know of a way to call MATLAB from PHP/Perl? I found the Perl module Math:MATLAB , but it seems not to work on Windows, and it's not easy to install and use. This would enable one to...
1
by: David R | last post by:
I am calling an Axis web service from a Net 2.0 client. To be helpful, the developers on the Axis side sent a test client that they created, with snippets below. What I am trying to do is add a...
3
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
2
by: zaheer181 | last post by:
Hai everybody, Iam assigned a task of implementing fuzzy c means algorithm in matlab to C language using graphics.h and my question is can we implement the same intensity of graphics in matlab...
0
by: newdbprgmer | last post by:
I am using a business objects API that is a web service and has axis as dependency. it works fine with 1.1 version, but with 1.3 gives an error. The code is as follows: public void...
0
by: Just_a_fan | last post by:
Some folks have searched, from time to time, for a dual axis MSChart with different scales on the two Y axes. The sample, extracted from running code I wrote, produces a graph with MSChart (VB9)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.