Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3c6ed2

Browse files
committed
added update fix
svn path=/trunk/matplotlib/; revision=970
1 parent 2baf97f commit b3c6ed2

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

CHANGELOG

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

3+
2005-02-14 0.72 released
4+
35
2005-02-14 fix bug in cbook alltrue() and onetrue() - SC
46

57
2005-02-11 updated qtagg backend from Ted - JDH
@@ -31,7 +33,7 @@ New entries should be added at the top
3133
2005-02-05 Added some default key press events to pylab figures: 'g'
3234
toggles grid - JDH
3335

34-
2005-02-05 Added some support for handling log switching for lines
36+
2005-02-05 Added some support for handling log switching for lines
3537
that have nonpos data - JDH
3638

3739
2005-02-04 Added Nadia's contour patch - contour now has matlab

examples/finance_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from matplotlib.dates import DateFormatter, WeekdayLocator, HourLocator, \
44
DayLocator, MONDAY, timezone
55
from matplotlib.finance import quotes_historical_yahoo, candlestick,\
6-
plot_day_summary
6+
plot_day_summary, candlestick2
77

88
import datetime
99

@@ -29,6 +29,7 @@
2929

3030
#plot_day_summary(ax, quotes, ticksize=3)
3131
candlestick(ax, quotes, width=0.6)
32+
3233
set( gca().get_xticklabels(), rotation=45, horizontalalignment='right')
3334

3435
show()

lib/matplotlib/axes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,9 @@ def add_line(self, l):
704704
if l.get_transform() != self.transData:
705705
xys = self._get_verts_in_data_coords(
706706
l.get_transform(), zip(xdata, ydata))
707-
xdata, ydata = zip(*xys)
707+
xdata = array([x for x,y in xys])
708+
ydata = array([y for x,y in xys])
709+
708710
self.update_datalim_numerix( xdata, ydata )
709711
#self.update_datalim(zip(xdata, ydata))
710712
self.lines.append(l)
@@ -723,8 +725,8 @@ def add_patch(self, p):
723725
p.set_clip_box(self.bbox)
724726
xys = self._get_verts_in_data_coords(
725727
p.get_transform(), p.get_verts())
728+
#for x,y in xys: print x,y
726729
self.update_datalim(xys)
727-
728730
self.patches.append(p)
729731

730732
def add_table(self, tab):

lib/matplotlib/finance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ def candlestick(ax, quotes, width=0.2, colorup='k', colordown='r',
193193
)
194194
rect.set_alpha(alpha)
195195

196+
196197
lines.append(vline)
197198
patches.append(rect)
198199
ax.add_line(vline)
199200
ax.add_patch(rect)
200-
201201
ax.autoscale_view()
202202

203203
return lines, patches

src/_transforms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ Bbox::update_numerix(const Py::Tuple &args) {
437437
int ignore = Py::Int(args[2]);
438438
if (ignore) {
439439
thisx = *(double *)(x->data);
440-
thisy = *(double *)(x->data);
440+
thisy = *(double *)(y->data);
441441
minx=thisx;
442442
maxx=thisx;
443443
miny=thisy;

0 commit comments

Comments
 (0)