On Fri, Feb 25, 2011 at 5:34 PM, Philipp A. <flying-sh...@web.de> wrote:

> 2011/2/25 Philipp A. <flying-sh...@web.de>
>
> 2011/2/25 Benjamin Root <ben.r...@ou.edu>
>>
>>> On Fri, Feb 25, 2011 at 8:09 AM, Philipp A. <flying-sh...@web.de> wrote:
>>>
>>>> hi,
>>>> Axes3D from mpl_toolkits.mplot3d does not override set_*ticklabels.
>>>> this 
>>>> bug<http://sourceforge.net/tracker/index.php?func=detail&aid=2874110&group_id=80706&atid=560720>is
>>>>  about the issue.
>>>> to get a crude replacement, i have to do the following:
>>>>
>>>> for x, s in enumerate(ticks):
>>>>> ax.text3D(x, -.1, -.5, s)
>>>>> for a in ax.w_xaxis.get_ticklabels():
>>>>> a.set_visible(False)
>>>>>
>>>>
>>>>  is there a way to do better and hack my values into the real tick
>>>> labels (i bet they are drawn internally the same as text3D, but there is no
>>>> way to access the values)?
>>>>
>>>>
>>> In matplotlib in the development branch, I am able to call
>>> ax.w_xaxis.set_ticklabels() (or ax.w_yaxis, or ax.w_zaxis) and have the
>>> ticks show up appropriately.  I have not tested earlier versions of
>>> matplotlib, though.  Which version are you using?
>>>
>>> Admittedly, the control of the ticks is very poor in mplot3d.  I hope to
>>> improve that over the next several months.
>>>
>>> Ben Root
>>>
>>
>> i use 0.99.3 both in university and at home, but somehow at home,
>> matplotlib complains about ValueError: Unknown projection '3d' at home.
>>
>> i’ll try 1.0.1 and report if it works.
>>
>
> update: i’ll see if a dev build does the trick tomorrow, as a local build
> of 1.0.1 doesn’t show the x/yticklabels and there doesn’t exist a function
> named set_zticklabels.
>

Phillipp,

The ability to call ax = fig.gca(projection='3d') was new for version
1.0.0.  This morning, I also noticed that functions like "set_zticklabels()"
did not exist.  I currently have a patch submitted for that and it should be
merged into the git repository tonight.  In the meantime, you can always do
something like:

ax.w_zaxis.set_ticklabels()

The functions like ax.set_zticks() merely call that function for the
appropriate axis.

Ben Root
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to