8000 more qt fixes · matplotlib/matplotlib@d09e4f6 · GitHub
[go: up one dir, main page]

Skip to content

Commit d09e4f6

Browse files
committed
more qt fixes
svn path=/trunk/matplotlib/; revision=903
1 parent 65bc910 commit d09e4f6

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
New entries should be added at the top
22

3+
2005-01-31 updated datalim in contour - JDH
4+
35
2005-01-30 Added backend_qtagg.py provided by Sigve Tjora - SC
46

57
2005-01-28 Added tk.inspect rc param to .matplotlibrc. IDLE users

lib/matplotlib/axes.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,6 @@ def changed(self):
10851085
tmp, x = ind
10861086
elif y == None:
10871087
y, tmp = ind
1088-
10891088
if len(shape(x)) != 2 or len(shape(y)) != 2:
10901089
raise TypeError("x and y must be 2D arrays.")
10911090

@@ -1099,6 +1098,18 @@ def changed(self):
10991098
if x == None and y == None:
11001099
y, x = indices((jmax,imax), 'd')
11011100

1101+
1102+
rx = ravel(x)
1103+
ry = ravel(y)
1104+
1105+
minx = amin(rx)
1106+
maxx = amax(rx)
1107+
miny = amin(ry)
1108+
maxy = amax(ry)
1109+
1110+
corners = (minx, miny), (maxx, maxy)
1111+
self.update_datalim( corners)
1112+
11021113
rz = ravel(z)
11031114
zmax = amax(rz)
11041115
zmin = amin(rz)

lib/matplotlib/backends/backend_qtagg.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def __init__(self, figure, window):
135135

136136
#Coordinates of the select rectangle if it is needed.
137137
self.rect = None
138-
138+
self.setMouseTracking(True)
139+
139140
def draw(self):
140141
"""
141142
Draw the figure using the renderer
@@ -223,7 +224,7 @@ class NavigationToolbar2QtAgg(NavigationToolbar2, qt.QToolBar):
223224
window - the qt.QMainWindow
224225
"""
225226
def __init__(self, canvas, window):
226-
qt.QToolBar.__init__(self, qt.QString(""), window, qt.Qt.DockTop)
227+
qt.QToolBar.__init__(self, qt.QString(""), window, qt.Qt.DockBottom)
227228
self.canvas = canvas
228229
self.window = window
229230
NavigationToolbar2.__init__(self, canvas)

lib/matplotlib/pylab.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,14 @@ def load(fname,comments='%'):
920920
921921
Example usage:
922922
923-
x,y = load('test.dat') # data in two columns
923+
X = load('test.dat') # data in two columns
924+
t = X[:,0]
925+
y = X[:,1]
926+
927+
Alternatively, you can do
928+
929+
t,y = transpose(load('test.dat')) # for two column data
930+
924931
925932
X = load('test.dat') # a matrix of data
926933

0 commit comments

Comments
 (0)
0