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

Different font in pdf files. #1335

Closed
mariosky opened this issue Apr 6, 2017 · 9 comments
Closed

Different font in pdf files. #1335

mariosky opened this issue Apr 6, 2017 · 9 comments

Comments

@mariosky
Copy link

mariosky commented Apr 6, 2017

screen shot 2017-04-06 at 12 25 25 am

When graphs are generated by the post-processing script, pdfs have a wider font in titles and axes. I am using Mac OS Sierra. I also tried creating the graphs in Linux and with the developer branch without success. Is anyone having this issue?

@brockho
Copy link
Contributor

brockho commented Apr 6, 2017

Hi. Thanks for reporting this issue. I think I have seen this already, but at the moment, I cannot reproduce the wrong figures in my setting (Windows 7 with Python 2.7.11 via Anaconda 4.0.0 and Adobe Acrobat Reader DC). Would you be so kind and upload the pdf directly? Just to check that this is not a "bug" with your pdf viewer. Thanks in advance.

@mariosky
Copy link
Author

mariosky commented Apr 6, 2017

ppfigdim_f003.pdf
Here it is. I will try to run the script in Windows. When running for the first time on Mac OS and Ubuntu, there is a message from matplotlib about loading fonts, maybe this is a Windows font? The pdf says is an embedded font.

@brockho
Copy link
Contributor

brockho commented Apr 6, 2017

When looking at your pdf, I have the same problem. It seems, indeed, as if a font is missing on your side. However, I am not aware that we use any Windows-specific font since COCO shall run on all kinds of machines due to the system-independence of python.

As you suggested, the problem might come from matplotlib. I, myself, have matplotlib 1.5.1, the latest stable release is 2.0.0. Can you tell us which version you have (type matplotlib.__version__ after import matplotlib in an (i)python shell)?

@mariosky
Copy link
Author

mariosky commented Apr 6, 2017

I have tried with versions 2.0.0 and 1.4.7. I will try it in Windows to see if it is specific to Mac.

@mariosky
Copy link
Author

mariosky commented Apr 7, 2017

Hi, I did not remember your version so I did a pip install matplotlib==1.4.3 and it worked fine.
I will try to generate some LaTeX tables I was having problems with and report if this also corrected that. @brockho thank you for your help.

@mariosky
Copy link
Author

mariosky commented Apr 7, 2017

When I run the scripts with matplotlib version 2.0.0 a Warning is printed:
ECDF graphs per function...
/Users/mario/.local/lib/python2.7/site-packages/cocopp-2.0.1-py2.7.egg/cocopp/ppfig.py:487: RuntimeWarning: invalid value encountered in log10
min([min(xdata), ax_limits[0], ax_limits[1]]) + 0.5) # np.log10(xdata[-1]) - np.log10(xdata[0])
This occurs in Win, Mac, Ubuntu

@brockho brockho added this to to be discussed in BBOB meeting 18.4.2017 Apr 10, 2017
brockho added a commit that referenced this issue Apr 18, 2017
@brockho
Copy link
Contributor

brockho commented Apr 18, 2017

We mention the issue now in the known issues of the overall README.md such that we can close it here.

@nikohansen
Copy link
Contributor

nikohansen commented Apr 20, 2017

Sorry, we currently don't see any solution other than playing with different matplotlib versions. This is clearly suboptimal and I would still like to keep this issue open to incentivise looking for a better solution.

@nikohansen
Copy link
Contributor

nikohansen commented May 24, 2017

It seems indeed to be a matplotlib issue and addressed in v2.0.1, see here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
BBOB meeting 18.4.2017
to be discussed
Development

No branches or pull requests

3 participants