font for errorbar plot

Dear Users,

            Is there a way to set font size of error bar plot axis? I tried below one but get error that "'ErrorbarContainer' object has no attribute 'xaxis'"

any help??

ax=plt.errorbar(y,x,err,label=‘STDV’)
plt.xlim(0,110)
for tick in ax.xaxis.get_major_ticks():
tick.label.set_fontsize(14)

···

Sudheer Joseph
Indian National Centre for Ocean Information Services
Ministry of Earth Sciences, Govt. of India
POST BOX NO: 21, IDA Jeedeemetla P.O.
Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55
Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),
Tel:+91-40-23044600®,Tel:+91-40-9440832534(Mobile)
E-mail:sjo.India@…287…;sudheer.joseph@…9…
Web-
http://oppamthadathil.tripod.com


Use ax.tick_params (
http://matplotlib.org/api/axes_api.html?highlight=tick_params#matplotlib.axes.Axes.tick_params
).

Hope that helps,
-paul

···

On Thu, May 30, 2013 at 6:28 PM, Sudheer Joseph <sudheer.joseph@...9...>wrote:

Dear Users,
                Is there a way to set font size of error bar plot axis? I
tried below one but get error that "'ErrorbarContainer' object has no
attribute 'xaxis'"
any help??

ax=plt.errorbar(y,x,err,label='STDV')
plt.xlim(0,110)
for tick in ax.xaxis.get_major_ticks():
                tick.label.set_fontsize(14)

    Dear Users,
                     Is there a way to set font size of error bar plot
    axis? I tried below one but get error that "'ErrorbarContainer'
    object has no attribute 'xaxis'"
    any help??

Paul is correct ("plt.tick_params(labelsize=14)"), but in addition, the error you are making is that errorbar does not return an Axes. To get a reference to the Axes you could follow the call to plt.errorbar() with "ax = plt.gca()".

···

On 2013/05/30 3:42 PM, Paul Hobson wrote:

On Thu, May 30, 2013 at 6:28 PM, Sudheer Joseph > <sudheer.joseph@...9... <mailto:sudheer.joseph@…9…>> wrote:

    ax=plt.errorbar(y,x,err,label='STDV')
    plt.xlim(0,110)
    for tick in ax.xaxis.get_major_ticks():
                     tick.label.set_fontsize(14)

Use ax.tick_params
(http://matplotlib.org/api/axes_api.html?highlight=tick_params#matplotlib.axes.Axes.tick_params).

Hope that helps,
-paul

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Thank you both Paul and Eric the kind helping hands,
Sudheer

···

**From:
**
Eric Firing <efiring@…202…>;
**To:
**
matplotlib-users@lists.sourceforge.net;
**Subject:
**
Re: [Matplotlib-users] font for errorbar plot
**Sent:
**
Fri, May 31, 2013 3:12:48 AM

On 2013/05/30 3:42 PM, Paul Hobson wrote:

On Thu, May 30, 2013 at 6:28 PM, Sudheer Joseph > <sudheer.joseph@…9… mailto:sudheer.joseph@...9...> wrote:

Dear Users,
Is there a way to set font size of error bar plot
axis? I tried below one but get error that “‘ErrorbarContainer’
object has no attribute ‘xaxis’”
any help??

Paul is correct (“plt.tick_params(labelsize=14)”), but in addition, the
error you are making is that errorbar does not return an Axes. To get a
reference to the Axes you
could follow the call to plt.errorbar() with
“ax = plt.gca()”.

ax=plt.errorbar(y,x,err,label=‘STDV’)
plt.xlim(0,110)
for tick in ax.xaxis.get_major_ticks():
tick.label.set_fontsize(14)

Use ax.tick_params
(http://matplotlib.org/api/axes_api.html?highlight=tick_params#matplotlib.axes.Axes.tick_params).

Hope that helps,
-paul


Get 100% visibility into Java/.NET code with AppDynamics Lite
It’s a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks,
with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2


Matplotlib-users mailing list
Matplotlib-users@…1739…ge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Get 100% visibility into Java/.NET code with AppDynamics Lite
It’s a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in
minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users