473,287 Members | 1,674 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,287 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 1130

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)...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
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: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.