WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-14-2010, 02:15 PM
Renato Lima Renato Lima is offline
Member
 
Join Date: Sep 2010
Posts: 54
Question Pylab, StringIO and viz.add

I have been trying to generate some charts on the fly and then apply them as textures to objects. However, viz.add triggers the following message when I try to add an image that has been saved to memory:

File "C:\Program Files (x86)\WorldViz\Vizard30/python\viz.py", line 8704, in add raise ValueError, 'Unrecognized file extension: '+fileType


This is my code:
t = pylab.arange(0.0, 2.0, 0.01)
s = pylab.sin(2*pylab.pi*t)
pylab.plot(t, s, linewidth=1.0)
pylab.xlabel('supertime (s)')
pylab.ylabel('voltage (mV)')

savemem = StringIO.StringIO()

pylab.savefig(imgData, format='png' )
pylab.close()
texturetoapply = viz.add(imgData.read)

Is it a limitation of vizard? or am I doing something wrong? I really don't want to save the file to the disk as it greatly reduces performance.

Thanks
Reply With Quote
 


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 02:08 PM.


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