On Sun, Oct 10, 2010 at 8:54 PM, Burak TUYSUZ <bzt...@psu.edu> wrote:

>
> I am trying to show the numbers at x and y axis in scientific notation but
> it does not work.
> Can anyone help me.
> Thank you in advance.
> Here is the code and fs is 60 000 000.
>
>
>    from matplotlib.ticker import ScalarFormatter
>    formatter = ScalarFormatter(useMathText=True)
>    formatter.set_scientific(True)
>    formatter.set_powerlimits((-1,3))
>
>    fig1 = plt.figure()
>    ax1 = fig1.gca(projection='3d', azim=0)
>    ax1.xaxis.set_major_formatter(formatter)
>    ax1.yaxis.set_major_formatter(formatter)
>
>    tau_val, freq_val = npy.meshgrid(npy.float64(tau_val)/fs,
> npy.float64(freq_val)*fs)
>    ax1.plot_surface(tau_val, freq_val, caf, rstride=1, cstride=1,
> cmap=cm.jet, linewidth=0, antialiased=False)
>
>   plt.show()
>
>
Burak,

This is because in an Axes3D object, the .xaxis and .yaxis refer to the axis
for the draw space, not the the 3d projected axis.  I know it is confusing,
but the axis objects that you want are called ".w_xaxis" and ".w_yaxis" and
".w_zaxis".

I hope that helps!
Ben Root
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to