Border appearance

On the two routines I’m modifying from examples, boundaries and borders are generally a hefty black.

How can I control color and/or thickness and/or turn off items like boundaries that are drawn in black?

···


– Jonathan Hayward, christos.jonathan.hayward@…287…

** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?

** All of this is waiting for you at http://JonathansCorner.com

++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com

There are two borders in question, the figure border and the axes
border. Both are rectangle instances. You can control the figure
border with the figurePatch instance

fig.figurePatch.set_edgecolor('white')
fig.figurePatch.set_linewidth(0.5)

and similarly for the axes axesFrame instance

ax = axes([left, bottom, width, height])
ax.axesFrame.set_edgecolor('red')
ax.axesFrame.set_linewidth(0.5)

You can make the frame invisible in a few different ways:

* set the edgecolor to be the same as the face color
* set the linewidth to 0
* set the visible property to False (ax.axesFrame.set_visible(False))

JDH

···

On Tue, Jul 22, 2008 at 4:28 PM, Jonathan Hayward http://JonathansCorner.com <jonathan.hayward@...789...> wrote:

On the two routines I'm modifying from examples, boundaries and borders are
generally a hefty black.

How can I control color and/or thickness and/or turn off items like
boundaries that are drawn in black?

On the two routines I’m modifying from examples, boundaries and borders are

generally a hefty black.

How can I control color and/or thickness and/or turn off items like

boundaries that are drawn in black?

There are two borders in question, the figure border and the axes

border. Both are rectangle instances. You can control the figure

border with the figurePatch instance

How do I query/set the figure in question?

I was specifying the axes earlier, and setting a linewidth of 0 seemed to remove one of two borders (or, from a non-technical perspective, made the border half as thick). See before.png and after.png: getting closer at least…

before.png

after.png

···

On Tue, Jul 22, 2008 at 4:57 PM, John Hunter <jdh2358@…287…> wrote:

On Tue, Jul 22, 2008 at 4:28 PM, Jonathan Hayward > > http://JonathansCorner.com <jonathan.hayward@…789…> wrote:

fig.figurePatch.set_edgecolor(‘white’)

fig.figurePatch.set_linewidth(0.5)

and similarly for the axes axesFrame instance

ax = axes([left, bottom, width, height])

ax.axesFrame.set_edgecolor(‘red’)

ax.axesFrame.set_linewidth(0.5)

You can make the frame invisible in a few different ways:

  • set the edgecolor to be the same as the face color

  • set the linewidth to 0

  • set the visible property to False (ax.axesFrame.set_visible(False))

JDH


– Jonathan Hayward, christos.jonathan.hayward@…287…

** To see an award-winning website with stories, essays, artwork,

** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com

++ Would you like to curl up with one of my hardcover books?

++ You can now get my books from http://CJSHayward.com

Taking a step back:

What should I be digging into so I’ll have the concepts and tools to manipulate features like color and thickness of borders on a bar chart and on a pie graph and any parts that may have a border, whether the shadow on a pie graph is on the lower left or upper right, etc.?

I’m looking at the tutorial ; I’d welcome suggestions or clarifications about what I should be reading.

···

On Tue, Jul 22, 2008 at 4:57 PM, John Hunter <jdh2358@…287…> wrote:

On Tue, Jul 22, 2008 at 4:28 PM, Jonathan Hayward > > http://JonathansCorner.com <jonathan.hayward@…789…> wrote:

On the two routines I’m modifying from examples, boundaries and borders are

generally a hefty black.

How can I control color and/or thickness and/or turn off items like

boundaries that are drawn in black?

There are two borders in question, the figure border and the axes

border. Both are rectangle instances. You can control the figure

border with the figurePatch instance

fig.figurePatch.set_edgecolor(‘white’)

fig.figurePatch.set_linewidth(0.5)

and similarly for the axes axesFrame instance

ax = axes([left, bottom, width, height])

ax.axesFrame.set_edgecolor(‘red’)

ax.axesFrame.set_linewidth(0.5)

You can make the frame invisible in a few different ways:

  • set the edgecolor to be the same as the face color

  • set the linewidth to 0

  • set the visible property to False (ax.axesFrame.set_visible(False))

JDH


– Jonathan Hayward, christos.jonathan.hayward@…287…

** To see an award-winning website with stories, essays, artwork,

** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com

++ Would you like to curl up with one of my hardcover books?

++ You can now get my books from http://CJSHayward.com

On Thu, Jul 24, 2008 at 10:22 AM, Jonathan Hayward http://JonathansCorner.com

I'm looking at the tutorial ; I'd welcome suggestions or clarifications
about what I should be reading.

The tutorial is a good start, as is the user's guide

http://matplotlib.sourceforge.net/users_guide_0.98.1.pdf

some of the user's guide is dated, and the neww docs we are working on
(still in beta) are at
http://matplotlib.sourceforge.net/doc/html/index.html. The
screenshots (http://matplotlib.sourceforge.net/screenshots.html) and
examples (http://matplotlib.sourceforge.net/examples/) are good places
to go for inspiration. You will probably also want to read the artist
tutorial at http://matplotlib.sourceforge.net/doc/html/users/artists.html

Good luck!

JDH

Thank you; on to digging…

···

On Thu, Jul 24, 2008 at 10:29 AM, John Hunter <jdh2358@…287…> wrote:

On Thu, Jul 24, 2008 at 10:22 AM, Jonathan Hayward http://JonathansCorner.com

I’m looking at the tutorial ; I’d welcome suggestions or clarifications

about what I should be reading.

The tutorial is a good start, as is the user’s guide

http://matplotlib.sourceforge.net/users_guide_0.98.1.pdf

some of the user’s guide is dated, and the neww docs we are working on

(still in beta) are at

http://matplotlib.sourceforge.net/doc/html/index.html. The

screenshots (http://matplotlib.sourceforge.net/screenshots.html) and

examples (http://matplotlib.sourceforge.net/examples/) are good places

to go for inspiration. You will probably also want to read the artist

tutorial at http://matplotlib.sourceforge.net/doc/html/users/artists.html

Good luck!

JDH


– Jonathan Hayward, christos.jonathan.hayward@…287…

** To see an award-winning website with stories, essays, artwork,

** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com

++ Would you like to curl up with one of my hardcover books?

++ You can now get my books from http://CJSHayward.com