Bug 1154989 - In python3, matplotlib.pyplot can't show Chinese
Summary: In python3, matplotlib.pyplot can't show Chinese
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-matplotlib
Version: 22
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Spura
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-21 08:11 UTC by Zhenbo Li
Modified: 2016-07-19 17:03 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-19 12:15:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
The generated picture (19.29 KB, image/png)
2014-10-21 08:11 UTC, Zhenbo Li
no flags Details

Description Zhenbo Li 2014-10-21 08:11:13 UTC
Created attachment 948838 [details]
The generated picture

Description of problem:
In python3, matplotlib.pyplot can't show Chinese

Version-Release number of selected component (if applicable):

$ python3 --version
Python 3.3.2

Installed Packages
Name        : python3-matplotlib
Arch        : x86_64
Version     : 1.3.1
Release     : 3.fc20
Size        : 54 M
Repo        : installed

How reproducible:

if __name__ == '__main__':
    import matplotlib.pyplot
    matplotlib.pyplot.scatter(None, None)
    matplotlib.pyplot.xlabel("汉语")
    matplotlib.pyplot.ylabel("English")
    matplotlib.pyplot.show()


Steps to Reproduce:
Run the test code

Actual results:
The xlabel showed □□

Expected results:
汉语

Additional info:

Comment 1 Zbigniew Jędrzejewski-Szmek 2015-02-25 04:28:17 UTC
Could it be a matter of missing fonts?

Comment 2 Zhenbo Li 2015-02-25 09:20:34 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #1)
> Could it be a matter of missing fonts?

Maybe.
How can I know which font is needed?
Thanks.

Comment 3 Fedora End Of Life 2015-05-29 13:08:15 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2015-06-29 23:00:04 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Zhenbo Li 2015-06-30 07:17:12 UTC
It is still a bug in Fedora 22

Comment 6 tcaswell@gmail.com 2015-08-19 23:50:43 UTC
This is indeed a font issue.  The default font (Vera Sans) does not have glyphs for Chinese.  You just need to set the font search patch to include a font that _does_ have those glyphs.

The easiest way is to set 

font.sans-serif : Font_With_Glyphs

Comment 7 tcaswell@gmail.com 2015-08-19 23:53:33 UTC
Sorry, my last comment sent before I finished typing.

The easiest way is to set 

font.sans-serif : Font_with_glyphs, Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde,sans-serif

in your matplotlibrc file (see http://matplotlib.org/users/customizing.html#a-sample-matplotlibrc-file)

This should be closed as is as user space configuration issue.

Comment 8 Fedora Admin XMLRPC Client 2015-09-09 19:30:05 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Fedora Admin XMLRPC Client 2015-09-09 19:51:04 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Fedora End Of Life 2016-07-19 12:15:46 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 11 Zbigniew Jędrzejewski-Szmek 2016-07-19 17:03:45 UTC
Hopefully we can have fonts with better coverage as the default at some point, but right now "notabug" is better closing state.


Note You need to log in before you can comment on or make changes to this bug.