Skip to content

mlab.imshow fails with extent keyword argument #45

Closed
wants to merge 1 commit into from

3 participants

@wecacuee

Replacing module.actor.actor with module.actor. Not sure if this will break other things but this changes allows mlab.imshow(img, extent=[-.1, .1, -.1, .1, 0, 0]) to work which did not work previously. Also the integration test cases run fine.

@wecacuee wecacuee Replacing module.actor.actor with module.actor. Not sure if this will…
… break other things but this changes allows mlab.imshow(img, extent=[-.1, .1, -.1, .1, 0, 0]) to work which did not work previsously.
b2da34c
@wecacuee wecacuee closed this Aug 28, 2012
@GaelVaroquaux

Why did you close this PR?

@wecacuee

I am sorry. I realized that it might not be correct. The documentation of set_extent function says that the function doesn't work with ImageActor.

@GaelVaroquaux
@wecacuee

Yes, it did work for the case of mlab.imshow(img, extent=[....]). But I am afraid that it might break some other cases. I am not sure how many test cases check the use of extent keyword argument though. Moreover, I was trying to use extent keyword argument for a purpose that is better solved by the following snippet of code.

obj = mlab.imshow(img)
obj.actor.orientation = [0, 0, 0] # the required orientation 
obj.actor.position = [0, 0, 0] # the required  position 
obj.actor.scale = [0, 0, 0] # the required scale
@alimuldal

It seems to me that orientation, position and scale should ideally be arguments to imshow. At the very least, the extent argument should be removed from the documentation for imshow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.