Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greek letter display error [1.5.1] #6891

Closed
HuiDong opened this issue Aug 3, 2016 · 6 comments
Closed

Greek letter display error [1.5.1] #6891

HuiDong opened this issue Aug 3, 2016 · 6 comments

Comments

@HuiDong
Copy link

HuiDong commented Aug 3, 2016

To help us understand and resolve your issue please check that you have provided
the information below.

  • matplotlib version:1.5.1
    linux: ubuntu 16.04
    python: 2.7
  • Installed from ubuntu source: sudo apt-get install ...

The wrong output figure is attached, along with a correct one obtained from matplotlib 1.4.2.

One interesting thing:
if I choose text.usetex: True, the formula is then correct, however, other font will be messed up, by which, I mean not Times New Roma.

correct.pdf
error.pdf

@tacaswell
Copy link
Member

Try removing everything in ~/.cache/matplotlib.

This is not the first time we have seen this, but is seems to be transient(ish)

Can you give us a MWE?

attn @mdboom @zblz

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Aug 4, 2016
@HuiDong
Copy link
Author

HuiDong commented Aug 4, 2016

Thanks for prompt reply.

Actually, I have tried clean cache for matplotlib before. Nothing changes.

Please let me know the update. A MWE is attached below,

Thanks,
Hui

#==========================================
from numpy import *
from pylab import *

#==========================================
#matplotlib.rcParams['text.usetex'] = True

x=arange(0,6.28,0.1)
y=sin(x)

plot(x,y,'bo--')
xlabel(r"$J/\omega_0$")
ylabel(r"$1-\left\langle
\psi_{S}\right|\rho_{\mathrm{steady}}\left|\psi_{S}\right\rangle
-\rho_{00}$")
title("test title here")
savefig('./other.pdf')

show()

On Wed, Aug 3, 2016 at 10:35 PM, Thomas A Caswell notifications@github.com
wrote:

Try removing everything in ~/.cache/matplotlib.

This is not the first time we have seen this, but is seems to be
transient(ish)

Can you give us a MWE?

attn @mdboom https://github.com/mdboom @zblz https://github.com/zblz


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6891 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEHaUlbGtg-c5MkNyc2_SSvL0OoMmF4jks5qcV4VgaJpZM4JbxX3
.


Hui Dong Ph.D

The Institute for Quantum Science and Engineering,
Texas A&M University, College Station, TX 77840

Email: huidong@tamu.edu
grantadong@gmail.com


@jenshnielsen
Copy link
Member

After correcting syntax errors in your example it works as expected for me.

from numpy import *
from pylab import *

#==========================================
#matplotlib.rcParams['text.usetex'] = True

x=arange(0,6.28,0.1)
y=sin(x)

plot(x,y,'bo--')
xlabel(r"$J/\omega_0$")
ylabel(r"$1-\left\langle"
r"\psi_{S}\right|\rho_{\mathrm{steady}}"
r"\left|\psi_{S}\right\rangle-\rho_{00}$")
title("test title here")
savefig('./other.pdf')

show()

other.pdf

@zblz
Copy link
Member

zblz commented Aug 4, 2016

It works fine for me as well, both in 1.5.2 and master.

@HuiDong
Copy link
Author

HuiDong commented Aug 4, 2016

Thanks for checking. It is still not correct on my end.

Installed the master version from source code. The funny characters disappeared. It may related to version 1.5.1, which is from package for ubuntu.
other.pdf

And also, Installed from source code 1.5.1. No problem at all

@QuLogic
Copy link
Member

QuLogic commented Feb 6, 2017

This appears to be working for us and the original reporter, so I'm going to close this issue.

@QuLogic QuLogic closed this as completed Feb 6, 2017
@QuLogic QuLogic modified the milestones: unassigned, 2.0.1 (next bug fix release) Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants