mplot3d ticklabels

hi,
Axes3D from mpl_toolkits.mplot3d does not override set_*ticklabels.
this bug 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

···

On Fri, Feb 25, 2011 at 8:09 AM, Philipp A. <flying-sheep@…273…> wrote:

hi,
Axes3D from mpl_toolkits.mplot3d does not override set_*ticklabels.
this bug 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)?

2011/2/25 Benjamin Root <ben.root@…1304…>

hi,
Axes3D from mpl_toolkits.mplot3d does not override set_*ticklabels.
this bug 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.

···

On Fri, Feb 25, 2011 at 8:09 AM, Philipp A. <flying-sheep@…273…> wrote:

2011/2/25 Philipp A. <flying-sheep@…273…>

2011/2/25 Benjamin Root <ben.root@…1304…>

hi,
Axes3D from mpl_toolkits.mplot3d does not override set_*ticklabels.
this bug 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.

···

On Fri, Feb 25, 2011 at 8:09 AM, Philipp A. <flying-sheep@…273…> wrote:

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

···

On Fri, Feb 25, 2011 at 5:34 PM, Philipp A. <flying-sheep@…273…> wrote:

2011/2/25 Philipp A. <flying-sheep@…3455…>

2011/2/25 Benjamin Root <ben.root@…1304…>

On Fri, Feb 25, 2011 at 8:09 AM, Philipp A. <flying-sheep@…273…> wrote:

hi,
Axes3D from mpl_toolkits.mplot3d does not override set_*ticklabels.
this bug 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.