Re: IDL 8.5 Python Bridge [message #91707 is a reply to message #91699] |
Thu, 13 August 2015 14:37   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Thursday, August 13, 2015 at 12:31:28 PM UTC-6, nata wrote:
> Hi Chris,
>
> I was wondering if a python drawable wrapper object will also be available. Like a pyhton object to which IDL could draw.
>
> Is this asking too much?
> nata
Hi nata,
You mean like this?
; Define some IDL variables
labels = ['Baltam', 'Python', 'IDL', 'Other']
sizes = [20, 30, 40, 10]
colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
explode = [0, 0, 0.1, 0] ; "explode" the 3rd slice
; Import some Python modules
pyplot = Python.Import('matplotlib.pyplot')
; Call methods on the Python modules
pie = pyplot.pie(sizes, explode=explode, $
labels=labels, colors=colors, $
autopct='%1.1f%%', /shadow, startangle=90)
void = pyplot.axis('equal')
void = pyplot.savefig("myplot.png", dpi = 96)
void = pyplot.show()
If so, then the answer is yes! Forget those pesky IDL function graphics, now you can use Python function graphics! ;-)
-Chris
|
|
|