WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 07-21-2011, 11:12 AM
hotshotiguana hotshotiguana is offline
Join Date: Mar 2011
Posts: 22
Matplotlib Figure Upside Down


I am trying to put a figure.canvas image on a texture that I have created in Vizard, but every time I try to setImageData() on that texture the image is displayed upside-down. Is there a way to flip this image before placing it on the texture? See my code below.
fig = plt.figure(num=3, figsize=(10.24, 5.12), dpi=100, edgecolor='k', facecolor='w')
ax = fig.add_subplot(111)
imageData = fig.canvas.tostring_rgb()
imageSize = fig.get_width_height()
myTex.setImageData(imageData, imageSize) #myTex is a blank white wall

Reply With Quote
Old 07-22-2011, 12:17 AM
sleiN13 sleiN13 is offline
Join Date: Dec 2008
Posts: 83
You could probably use the .texmat function on the wall (myTex?) and just give the transform there a rotation/flip.
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 09:55 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC