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

Skip to content

Commit d780add

Browse files
committed
added set_locs to formatter
svn path=/trunk/matplotlib/; revision=529
1 parent 6d161df commit d780add

13 files changed

Lines changed: 23 additions & 28 deletions

TODO

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ ZeroDivisionError: SeparableTransformation::eval_scalars yin interval is zero; c
541541
-- check signal connect and disconnect in interactive use with
542542
multiple figure creation / deletion etc.
543543

544-
-- add xlim, ylim
544+
-- DONE add xlim, ylim
545545

546546
-- tick bug on preserve, possibly center preserved image, flagt to
547547
reshape axes on preserve
@@ -568,6 +568,9 @@ ZeroDivisionError: SeparableTransformation::eval_scalars yin interval is zero; c
568568

569569
-- bk://sidl.bkbits.net/BuildSystem for py configure
570570

571-
-- post hacking polints memo on site, ann and send copy to Fernando
571+
-- post hacking points memo on site, ann and send copy to Fernando
572572

573+
-- loadrc() function, possibly replacing per-directory .matplotlibrc
574+
files.
573575

576+
-- file save dialog for Tk? See Mayavi for the right call to make.

examples/bar_stacked.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616

1717
ylabel('Scores')
1818
title('Scores by group and gender')
19-
set(gca(), 'xticks', ind+(width/2))
20-
set(gca(), 'xticklabels', ('G1', 'G2', 'G3', 'G4', 'G5') )
21-
set(gca(), 'xlim', [-width,len(ind)])
22-
set(gca(), 'yticks', arange(0,81,10))
19+
xticks(ind+width/2., ('G1', 'G2', 'G3', 'G4', 'G5') )
20+
yticks(arange(0,81,10))
2321
legend( (p1[0], p2[0]), ('Men', 'Women') )
2422

2523
show()

examples/barchart_demo.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616

1717
ylabel('Scores')
1818
title('Scores by group and gender')
19-
set(gca(), 'xticks', ind+width)
20-
set(gca(), 'xticklabels', ('G1', 'G2', 'G3', 'G4', 'G5') )
19+
xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') )
2120

2221
legend( (p1[0], p2[0]), ('Men', 'Women') )
23-
#axis([-10, 10, -10, 100])
22+
2423
#savefig('barchart_demo')
2524
show()

examples/csd_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
subplot(211)
2525
plot(t, s1, 'b-', t, s2, 'g-')
26-
set(gca(), 'xlim', [0,5])
26+
xlim(0,5)
2727
xlabel('time')
2828
ylabel('s1 and s2')
2929

examples/gdtest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ def f(t):
1717
subplot(211)
1818
l = plot(t1, f(t1), 'k-^')
1919
set(l, 'markerfacecolor', 'r')
20-
set(gca(), 'xlim', [0,5])
20+
xlim(0,5)
2121
#set(l, 'markeredgecolor', 'r')
2222
title('A tale of 2 subplots', fontsize=12)
2323
ylabel('Signal 1', fontsize=10)
2424

2525
subplot(212)
2626
l = plot(t1, f(t1), 'k->')
27-
set(gca(), 'xlim', [0,5])
27+
xlim(0,5)
2828
ylabel('Signal 2', fontsize=10)
2929
xlabel('time (s)', fontsize=10, fontname='Courier')
3030

examples/histogram_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@
1919
axis([40, 160, 0, 0.03])
2020
grid(True)
2121

22-
#set(gca(), 'xlim', [40, 160])
2322
#savefig('histogram_demo',dpi=72)
2423
show()

examples/image_demo2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
x = sum(A,0)
2727
subplot(212)
2828
bar(arange(w), x)
29-
set(gca(), 'xlim', [0,h-1])
29+
xlim(0,h-1)
3030
ylabel('density')
3131
set(gca(), 'xticklabels', [])
3232

examples/invert_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
s = exp(-t)
1212
plot(t, s)
1313

14-
set(gca(), 'xlim', [5,0]) # decreasing time
14+
xlim(5,0) # decreasing time
1515

1616
xlabel('decreasing time (s)')
1717
ylabel('voltage (mV)')

examples/mri_with_eeg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
im = take(im, nonzero(im)) # ignore the background
3030
im = im/(2.0**15) # normalize
3131
hist(im, 100)
32-
set(gca(), 'xticks', [-1, -.5, 0, .5, 1])
33-
set(gca(), 'yticks', [])
32+
xticks([-1, -.5, 0, .5, 1])
33+
yticks([])
3434
xlabel('intensity')
3535
ylabel('MRI density')
3636

@@ -77,8 +77,8 @@
7777
ax.add_line(thisLine)
7878
ticklocs.append(offset)
7979

80-
set(gca(), 'xlim', [0,10])
81-
set(gca(), 'xticks', arange(10))
80+
xlim(0,10)
81+
xticks(arange(10))
8282

8383
set(gca(), 'yticklabels', ['PG3', 'PG5', 'PG7', 'PG9'])
8484

examples/scatter_demo2.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
close = 0.003*intc.close[:-2]/0.003*intc.open[:-2]
1212
p = scatter(delta1[:-1], delta1[1:], c=close, s=volume)
1313
set(p, 'alpha', 0.75)
14-
#set(gca(), 'xticks', arange(-0.06, 0.061, 0.02))
15-
#set(gca(), 'yticks', arange(-0.06, 0.061, 0.02))
1614
xlabel(r'$\Delta_i$', size='x-large')
1715
ylabel(r'$\Delta_{i+1}$', size='x-large')
1816
title(r'Volume and percent change')

0 commit comments

Comments
 (0)