Re: [Matplotlib-users] Using labels with "twinx()"

2011-09-28 Thread Klonuo Umom
Thanks JJ, `axes_grid1` seems to handle this issue On Wed, Sep 28, 2011 at 4:01 PM, Jae-Joon Lee wrote: > > On Wed, Sep 28, 2011 at 3:32 PM, Klonuo Umom wrote: > > How to deal with this, without manually positioning legends and if possible > > including all annotated plot l

Re: [Matplotlib-users] Using labels with "twinx()"

2011-09-28 Thread Klonuo Umom
0 to 1 values not referenced to any plot. On Wed, Sep 28, 2011 at 9:14 AM, Stephen George wrote: > On 28/09/2011 4:32 PM, Klonuo Umom wrote: > > Please consider: > > plot([1, 2, 3, 4], label='line 1') > twinx() > plot([11, 12, 11, 14], label='line 2') >

Re: [Matplotlib-users] Histograms

2011-09-28 Thread Klonuo Umom
IMHO, when looking for basics and even more with intent to replicate some graph, it's easy to start by looking at matplotlib gallery: http://matplotlib.sourceforge.net/gallery.html and find best match. In you case: http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo_extended.h

[Matplotlib-users] Using labels with "twinx()"

2011-09-27 Thread Klonuo Umom
Please consider: plot([1, 2, 3, 4], label='line 1') twinx() plot([11, 12, 11, 14], label='line 2') legend() will draw only label for 'line 2' plot([1, 2, 3, 4], label='line 1') legend() twinx() plot([11, 12, 11, 14], label='line 2') legend() same result, as it will overwrite label 'line 1' wi

Re: [Matplotlib-users] How to use specgram() window function?

2011-09-20 Thread Klonuo Umom
Thank you very much Fabrice I have no further questions Cheers On Tue, Sep 20, 2011 at 1:43 PM, Fabrice Silva wrote: > Le mardi 20 septembre 2011 à 12:59 +0200, Klonuo Umom a écrit : > > > If you don't mind, I have another question. > > Those files are audio files. Can I

Re: [Matplotlib-users] How to use specgram() window function?

2011-09-20 Thread Klonuo Umom
On Tue, Sep 20, 2011 at 12:27 PM, Fabrice Silva wrote: > Le mardi 20 septembre 2011 à 12:12 +0200, Klonuo Umom a écrit : > > Ah, I was using wrong parameter... Thanks. That works fine > > You could also use a callable (instead of the vector) so that specgram > internally autom

Re: [Matplotlib-users] How to use specgram() window function?

2011-09-20 Thread Klonuo Umom
Ah, I was using wrong parameter... Thanks. That works fine On Tue, Sep 20, 2011 at 8:27 AM, Fabrice Silva wrote: > Le lundi 19 septembre 2011 à 19:54 +0200, Klonuo Umom a écrit : > > I want to use kaiser window that's part of numpy for drawing spectrogram > > > > specgr

[Matplotlib-users] How to use specgram() window function?

2011-09-19 Thread Klonuo Umom
I want to use kaiser window that's part of numpy for drawing spectrogram specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, cmap=None, xextent=None, pad_to=None, sides='default', scale_by_freq=None, **kwargs) *wi

Re: [Matplotlib-users] xticks() shifted by 1

2011-09-17 Thread Klonuo Umom
Yes, that seems the right way I used it before but forgot it in the mean time On Sat, Sep 17, 2011 at 10:56 PM, Benjamin Root wrote: > On Sat, Sep 17, 2011 at 3:51 PM, Klonuo Umom wrote: >> >> I want to plot multiple plot lines, and would prefer lines to start at >> x-ax

Re: [Matplotlib-users] xticks() shifted by 1

2011-09-17 Thread Klonuo Umom
I want to plot multiple plot lines, and would prefer lines to start at x-axis beginning (so they "source" vertically from y-axis) If I use suggested method from current replies lines would not start from x-axis beginning, but I guess I'll need to look in Axes module and make my preferences. Thanks

Re: [Matplotlib-users] xticks() shifted by 1

2011-09-17 Thread Klonuo Umom
Yes, I noticed the same and indeed I used sorted values in original problem I forgot to add it in my simplified snippet On Sat, Sep 17, 2011 at 10:34 PM, John Hunter wrote: > > While this is safe because calls to keys and values will return lists > in congruent order of no intervening dict modifi

Re: [Matplotlib-users] xticks() shifted by 1

2011-09-17 Thread Klonuo Umom
Hm.. it not within matplotlib.pyplot module... needs more digging OK, thanks On Sat, Sep 17, 2011 at 10:27 PM, Benjamin Root wrote: > > On Sat, Sep 17, 2011 at 3:22 PM, Klonuo Umom wrote: >> >> Thanks for your fast replies. >> One more thing if possible: How can I tel

Re: [Matplotlib-users] xticks() shifted by 1

2011-09-17 Thread Klonuo Umom
Thanks for your fast replies. One more thing if possible: How can I tell xticks() to start at 0 (at x-axis start) -- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2__

[Matplotlib-users] xticks() shifted by 1

2011-09-17 Thread Klonuo Umom
Hi, please consider this snippet: import matplotlib.pyplot as plt d={} for i in range(1,21): d[i] = i**2 plt.plot(d.values()) plt.xticks(d.keys()) plt.show() As it can be seen from attached screenshot, xticks values are shifted to right (by 1). Seems strange, but perhaps something to do wit

Re: [Matplotlib-users] EMF output: too many values to unpack error

2011-06-09 Thread Klonuo Umom
On 09.06.2011 19:52:18 Benjamin Root wrote: > You could also just edit your copy > of the file C:\Python26\lib\site- > packages\matplotlib\backends\backend_emf.py so that [:3] is added to the end > of lines 69 and 105. This page should show you what changes you need: > https://github.com/WeatherG

Re: [Matplotlib-users] EMF output: too many values to unpack error

2011-06-09 Thread Klonuo Umom
On 09.06.2011 19:29:35 Benjamin Root wrote: > I looks like backend_emf.py is choking on rgba values. Is EMF unable to > handle Alpha channels? The fix should be fairly easy, though. > I have no idea. I installed pyemf today as mpl asked me to if I want to export to EMF. I wanted to use EMF as

Re: [Matplotlib-users] EMF output: too many values to unpack error

2011-06-09 Thread Klonuo Umom
On 09.06.2011 19:00:34 Benjamin Root wrote: > Ah, so the bug is in the emf backend. Which version of matplotlib are you > using? > > import matplotlib > print matplotlib.__version__ Latest stable I guess: 1.0.1 -- Edi

Re: [Matplotlib-users] EMF output: too many values to unpack error

2011-06-09 Thread Klonuo Umom
On 09.06.2011 18:47:42 Benjamin Root wrote: > Question, does the following cause the same error? > > from pylab import * > plot([1, 2, 3]) > savefig('foobar.emf') > > There might be an important difference between saving from the save dialog > and saving directly through the savefig command. >

Re: [Matplotlib-users] How to use UTF-8 for labels on Windows XP?

2011-06-09 Thread Klonuo Umom
On 09.06.2011 17:58:49 Daniel Mader wrote: > Hi, > > I just noticed this doesn't work here, too, as I expected :( > > with u'äöüß°€' I can print the string, but the labels are still broken > in the plot: > > # -*- coding: utf-8 -*- > > import matplotlib.pyplot as plt > plt.plot([1,2,3,4]) > >

Re: [Matplotlib-users] EMF output: too many values to unpack error

2011-06-09 Thread Klonuo Umom
On 09.06.2011 18:06:57 Nick Veitch wrote: > Some code sample would help. It means what it says - trying to assign > tuples or whatever to too few values, e.g.: > x,y= (1,2,3) > > Is the error raised in your code or a library? Take any for example, like 'plot([1,2,3])' it doesn't matter I descri

Re: [Matplotlib-users] How to use UTF-8 for labels on Windows XP?

2011-06-09 Thread Klonuo Umom
Here is trace if I run this UTF-8 encoded file: === #-*- coding: utf-8 -*- import matplotlib.pyplot as plt plt.plot([1,2,3,4]) plt.ylabel(r'Пајтон') plt.show() --- on command line: === Tra

Re: [Matplotlib-users] How to use UTF-8 for labels on Windows XP?

2011-06-09 Thread Klonuo Umom
wrote: > Hi, > > try putting an r in front of your string: > e.g. label=r'äöü߀' > > And it might help to tell your editor the used encoding, too, by > putting this as the first line: > # -*- coding: utf-8 -*- > > > Hope this helps, > Daniel >

[Matplotlib-users] EMF output: too many values to unpack error

2011-06-09 Thread Klonuo Umom
I use matplotlib through IPython on Windows XP with Python 2.6.6 and Qt4Agg as backend Trying to save plot as EMF, after installing pyemf 2.0 raises this error: too many values to unpack -- EditLive Enterprise is the wo

[Matplotlib-users] How to use UTF-8 for labels on Windows XP?

2011-06-09 Thread Klonuo Umom
Hi, How can I use font in my locale or even better UTF-8 for plot annotations? Right now I can see only empty rectangles instead characters when I try to enter anything other then ASCII Thanks -- EditLive Enterprise i