Skip to content

Commit bee410d

Browse files
authored
Merge pull request matplotlib#12685 from dstansby/axes-rgb
Make ticks in demo_axes_rgb.py visible
2 parents cb0135c + d4e3c34 commit bee410d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

examples/axes_grid1/demo_axes_rgb.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def get_rgb():
2323
Z, extent = get_demo_image()
2424

2525
Z[Z < 0] = 0.
26-
Z = Z/Z.max()
26+
Z = Z / Z.max()
2727

2828
R = Z[:13, :13]
2929
G = Z[2:, 2:]
@@ -49,9 +49,6 @@ def make_cube(r, g, b):
4949
def demo_rgb():
5050
fig, ax = plt.subplots()
5151
ax_r, ax_g, ax_b = make_rgb_axes(ax, pad=0.02)
52-
#fig.add_axes(ax_r)
53-
#fig.add_axes(ax_g)
54-
#fig.add_axes(ax_b)
5552

5653
r, g, b = get_rgb()
5754
im_r, im_g, im_b, im_rgb = make_cube(r, g, b)
@@ -63,10 +60,8 @@ def demo_rgb():
6360

6461

6562
def demo_rgb2():
66-
fig = plt.figure(2)
63+
fig = plt.figure()
6764
ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8], pad=0.0)
68-
#fig.add_axes(ax)
69-
#ax.add_RGB_to_figure()
7065

7166
r, g, b = get_rgb()
7267
kwargs = dict(origin="lower", interpolation="nearest")
@@ -76,6 +71,7 @@ def demo_rgb2():
7671
ax.RGB.set_ylim(0.9, 10.6)
7772

7873
for ax1 in [ax.RGB, ax.R, ax.G, ax.B]:
74+
ax1.tick_params(axis='both', direction='in')
7975
for sp1 in ax1.spines.values():
8076
sp1.set_color("w")
8177
for tick in ax1.xaxis.get_major_ticks() + ax1.yaxis.get_major_ticks():
@@ -86,6 +82,6 @@ def demo_rgb2():
8682

8783

8884
demo_rgb()
89-
ax = demo_rgb2()
85+
demo_rgb2()
9086

9187
plt.show()

0 commit comments

Comments
 (0)