 # Thicker Frame and Remove Part of Frame

Hi

How can I:

1. make the frame of the plot thicker and

2. remove the top and right of the frame.

Thanks

Ted

There are probably a number of ways to do this (partly because spines are relatively new). Here's one possibility:

import matplotlib.pyplot as plt

f, ax = plt.subplots()
ax.plot([0, 1])
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
ax.spines['bottom'].set_linewidth(3)
ax.spines['left'].set_linewidth(3)
plt.show()

Best,
-Tony

···

On Sep 10, 2010, at 10:42 AM, Ted Kord wrote:

Hi

How can I:

1. make the frame of the plot thicker and
2. remove the top and right of the frame.

Thanks

Ted

Hi Tony

Thanks. Works perfectly!

Ted

···

On 10 September 2010 15:54, Tony S Yu <tsyu80@…287…> wrote:

On Sep 10, 2010, at 10:42 AM, Ted Kord wrote:

Hi

How can I:

1. make the frame of the plot thicker and
1. remove the top and right of the frame.

Thanks

Ted

There are probably a number of ways to do this (partly because spines are relatively new). Here’s one possibility:

import matplotlib.pyplot as plt

f, ax = plt.subplots()

ax.plot([0, 1])

ax.spines[‘right’].set_visible(False)

ax.spines[‘top’].set_visible(False)

ax.xaxis.set_ticks_position(‘bottom’)

ax.yaxis.set_ticks_position(‘left’)

ax.spines[‘bottom’].set_linewidth(3)

ax.spines[‘left’].set_linewidth(3)

plt.show()

Best,

-Tony