enthought / enthought/mayavi

can't set colorbar position

Open
#790 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
316
Avg merge
7h 44m
Merged PRs (30d)
5

Description

I have included a colorbar in my code.
cb = mlab.colorbar(orientation='vertical', nb_labels=6, label_fmt=fmt)

When I tried to set colorbar position and scale with the following lines, none of them works. However, I can drag and move the colorbar in plot window, and the dragging or scaling actually changed the values of 'cb.scalar_bar.position_coordinate.value', 'cb.scalar_bar.actual_position_coordinate.value', 'cb.scalar_bar.position2_coordinate.value', and 'cb.scalar_bar.actual_position2_coordinate.value'.

Thanks!

----
cb.scalar_bar.position = (0.88, 0.16)
cb.scalar_bar.position_coordinate.value = np.array([0.88, 0.16, 0.])
cb.scalar_bar.actual_position_coordinate.value = np.array([0.88, 0.16, 0.])
cb.scalar_bar.position2 = (0.1, 0.4)
cb.scalar_bar.position2_coordinate.value = np.array([0.1, 0.4, 0.])
cb.scalar_bar.actual_position2_coordinate.value = np.array([0.1, 0.4, 0.])

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.