On Mon, Mar 15, 2010 at 6:18 PM, David <ld...@gmx.net> wrote:

> Hello everyone,
>
> I hope you can help me with two problems I am struggling with. The second
> question, I imagine, should be rather easy, but I wasn't able to figure it
> out by googling.
>
> a) My graph will have Chinese labels, however mpl does not render the
> Chinese characters. I was unable to find how to teach it some CJK. Could you
> please indicate what the approach to be followed is?
>

Probably you need a unicode font-set that contain all the characters for
those alphabets. You can look at this example to see a simple unicode
demonstration example.
http://matplotlib.sourceforge.net/examples/pylab_examples/unicode_demo.html

Make sure you are using the right font in your matplotlib.



>
> Also, the xlabel is not shown when sizing/saving the graph at (3.6, 2.22)
> inches. Why is that? And how can I make mpl show the xlabel?
>

You have to adjust your label to get it seen. You may try with:

xlab = plt.xlabel("my x-axes label")
xlab.set_position((0.2, 0.1))


>
> b) In the file dea.png (attached) you can see that data points are rendered
> by points ('ko'). Each of these points has an associated name; for example,
> point (1,4) is 'A'. This name, 'A', should be incorporated into the graph so
> as to identify the point. 'A' should be placed right next to the dot. Could
> you please let me know what the easiest way is to solve this problem?
>

Two ways I can think of are: annotate and text functions of pyplot api.
http://matplotlib.sourceforge.net/api/pyplot_api.html

Let me know if these work fine for you.


>
> Thank you very much for your help!
>
> David
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>


-- 
Gökhan
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to