numbbo / coco

Numerical Black-Box Optimization Benchmarking Framework

Home Page:https://numbbo.github.io/coco

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different font in pdf files.

mariosky opened this issue · comments

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?

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.

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.

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)?

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.

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.

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

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

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.

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