AnchoredSizeBar Color

Hi,

Is there anyway to set the color of an AnchoredSizeBar artist from the mpl_toolkits.axes_grid.anchored_artists toolkit?

Thanks,

Mat

···


Dr. Mathew Topper
Institute for Energy Systems
School of Engineering
The University of Edinburgh
Faraday Building
The King’s Buildings
Edinburgh EH9 3JL
Tel: +44 (0)131 650 5570
School fax: +44 (0)131 650 6554
mathew.topper@…3926… <mailto:mathew.topper@…3926…>
http://www.see.ed.ac.uk/>

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

The anchored_artists needs improvements and things are still opaque.
For now you can do something like below,


a = AnchoredSizeBar(ax.transData, 0.1, "test",

loc=8, pad=0.1, borderpad=0.1, sep=2, prop=None,

frameon=False)

rect = a.size_bar._children[0]

rect.set_ec("g")

rect is a patch instance responsible for the bar. By default its height is 0 and facecolor=“none”.

Similarly, the text label can be accessed via a.txt_label._text.

Regards,

-JJ

···

On Wed, Apr 17, 2013 at 1:47 AM, Mathew Topper <mathew.topper@…3926…> wrote:

Hi,

Is there anyway to set the color of an AnchoredSizeBar artist from the

mpl_toolkits.axes_grid.anchored_artists toolkit?

Thanks,

Mat

Dr. Mathew Topper

Institute for Energy Systems

School of Engineering

The University of Edinburgh

Faraday Building

The King’s Buildings

Edinburgh EH9 3JL

Tel: +44 (0)131 650 5570

School fax: +44 (0)131 650 6554

mathew.topper@…3926… mailto:mathew.topper@...3932.....

http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/>

The University of Edinburgh is a charitable body, registered in

Scotland, with registration number SC005336.


Precog is a next-generation analytics platform capable of advanced

analytics on semi-structured data. The platform includes APIs for building

apps and a phenomenal toolset for data science. Developers can use

our toolset for easy data analysis & visualization. Get a free account!

http://www2.precog.com/precogplatform/slashdotnewsletter


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users