Talk about fortuitous timing!  I was looking into something this afternoon, 
thinking mathplotlib & ipython might do the trick especially since I 
already have spyder installed on my laptop (also running Ubuntu 12.10 
64-bit)... got home tonight and was playing with it a bit with an example 
from the mathplotlib docs, but not seeing any plot appear.  Came here and 
promptly found this thread.

FWIW, 'isinteractive()' does return True.  In my case, the code I was 
trying to plot was something like:

x = randn(10000)
hist(x, 100)

Just typing 'show()' afterwards didn't do anything.  Wrapping hist() in 
show(), however, does work

show(hist(x, 100))

I'm not sure if this is a glitch/bug/feature that has migrated from Debian 
to Ubuntu, but I was kind of under the impression as well that from an 
ipython shell, after typing '%pylab' to load mathplotlib and get into 
interactive mode, that just plain 'hist(x, 100)' should display the plot 
without the need to wrap 'show()' around it.  Is there something else that 
needs fixed / adjusted, or is this yet another thing that I need to just 
not run the version that comes with the distro?

Monte
On Thursday, January 10, 2013 3:39:35 PM UTC-8, Leopoldo Pena wrote:
>
> Hi David, 
>
> thank you for your reply. I do not know what version of spyder you are 
> using, but in mine 2.1.10 that does not work. Calling show() does not bring 
> up any plot, not in interactive mode or else. However, the command plot on 
> the standard python console works flawlessly. Importing matplotlib and 
> plotting from a source file and running it on ipython also works. However, 
> when i use the magic %pylab I cannot plot any figure on ipython.
>
>
> Thanks for your reply anyway.
>
> On Thursday, January 10, 2013 12:38:56 PM UTC-5, Leopoldo Pena wrote:
>>
>> Hi all,
>>
>> I'm rather newbie using spyder, but I like it a lot.
>> I have run into some issues though, that I am not sure how to fix or if 
>> that is the expected behaviour.
>>
>> This are the steps to reproduce it.
>>
>> 1 - Clean install of Ubuntu 12.10 64bits
>> 2- Using USC or apt install spyder (e.g. sudo apt-get install spyder) 
>> after allowing universe repositories.
>> Spyder 2.1.10, 
>> 3- Open spyder.
>> 4- Open Ipython (0.13.1) interpreter with contextual menu.
>> 5- type: %pylab to start scientific environment with matplotlib. IT IS 
>> NOT IMPORTED on ipython by default when opening a terminal.
>> 6- type:
>>              a=range(10)
>>              plot(a)
>>
>> 7- The output shows that the plot object has been generated, but nothing 
>> shows up on display, neither inline embebded or as a floating window.
>> Out[7]: [<matplotlib.lines.Line2D at 0x32d5610>]
>>
>> Replicating these steps on the standard python terminal produces a 
>> floating figure.
>>
>> Any advice?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/spyderlib/-/L7zNhPx39mUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spyderlib?hl=en.

Reply via email to