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
2011/6/9 Klonuo Umom klo...@gmail.com:
Hi,
How can I use font in my locale or even better
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:
===
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 described
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])
xlabel =
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.
Good
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
Thanks for your fast replies.
One more thing if possible: How can I tell xticks() to start at 0 (at x-axis
start)
--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
Hm.. it not within matplotlib.pyplot module... needs more digging
OK, thanks
On Sat, Sep 17, 2011 at 10:27 PM, Benjamin Root ben.r...@ou.edu wrote:
On Sat, Sep 17, 2011 at 3:22 PM, Klonuo Umom klo...@gmail.com wrote:
Thanks for your fast replies.
One more thing if possible: How can I tell
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 jdh2...@gmail.com wrote:
While this is safe because calls to keys and values will return lists
in congruent order of no
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
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 ben.r...@ou.edu wrote:
On Sat, Sep 17, 2011 at 3:51 PM, Klonuo Umom klo...@gmail.com wrote:
I want to plot multiple plot lines, and would prefer lines to start at
x
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)
Ah, I was using wrong parameter... Thanks. That works fine
On Tue, Sep 20, 2011 at 8:27 AM, Fabrice Silva si...@lma.cnrs-mrs.frwrote:
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
specgram(x, NFFT
, 2011 at 12:27 PM, Fabrice Silva si...@lma.cnrs-mrs.frwrote:
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 automatically get a NFFT
Thank you very much Fabrice
I have no further questions
Cheers
On Tue, Sep 20, 2011 at 1:43 PM, Fabrice Silva si...@lma.cnrs-mrs.frwrote:
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 limit dB
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'
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:
.
On Wed, Sep 28, 2011 at 9:14 AM, Stephen George
steve_...@optusnet.com.auwrote:
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')
legend()
will draw only label for 'line 2'
plot([1, 2, 3, 4
Thanks JJ,
`axes_grid1` seems to handle this issue
On Wed, Sep 28, 2011 at 4:01 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote:
On Wed, Sep 28, 2011 at 3:32 PM, Klonuo Umom klo...@gmail.com wrote:
How to deal with this, without manually positioning legends and if possible
including all
19 matches
Mail list logo