-
Notifications
You must be signed in to change notification settings - Fork 250
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
Gadfly scaling of figures got very much strange after the latest updates #1587
Comments
Any suggestions how to fix this?! It is very weird. |
@bjarthur can you help?! thank you! |
@bjarthur are there any updates on this. Clearly, Fontconfig causes this problem. Maybe it is only related to Windows machines but it is very annoying and causes many issues. Thank you! |
things get even worse if manual key is implemented:
|
@bjarthur these issues are extremely annoying and create a lof of plotting issues. |
@bjarthur |
sorry, but how can i help if i can't reproduce? the code is open source. please have a look. |
do you have any suggestions where to start? Are there any known issues with Fontconfig for Windows? |
i would guess the bug is in Compose/src/pango.jl somewhere. |
here is another crazy result:
|
I guess there is an issue with font rendering. The code incorrectly predicts the size of the axis titles and labels. It is especially pronounced if superscripts are invoked. |
Where in the code the size of generated labels is processed? Do you have tests in Compose about the size of generated text? |
Compose tests fail on windows:
|
Compose tests should pass once JuliaRegistries/General#63655 is merged. this was fixed awhile back. when reporting errors, please first checkout the master branch to confirm they still exist. |
the Compose.jl code i linked above defines max_text_extents. a quick search in Gadfly shows it is used throughout guide.jl. |
JuliaGraphics/Cairo.jl#349: is this related? |
@Mattriks JuliaGraphics/Cairo.jl#349 might be related. But this is potentially not the only problem. Definitely, there are issues with Gadfly/Compose when the font sizes are less than 1 pt. I have observed this as well in the past. |
@bjarthur I am also not sure why the axes got flipped?! |
@Mattriks maybe the small fonts used for the superscripts in the figure below create this crazy behavior. However, note here I create SVG file which I do not think uses Cairo. |
The nbsp error in svg is different, and has been reported elsewhere (google it). |
i am not worried about nbsp error @Mattriks . The problem is that figure is weird. Upside down. and crazy titles |
Did you check if pinning Pango_jll to an earlier version fixes it? |
@Mattriks Excellent suggestion! Both [email protected] and [email protected] work and the problem is fixed. I am fine to stick with an old version of Pango for the moment. However, it will be nice if this issue gets fixed soon or later. Thank you! |
|
I agree I confirm with additional testing that
|
However, I hope the Gadfly/Compose gets fixed to work with the latest Pango_jll |
But this issue doesn't seem to affect MacOS or Linux users, so not easy to fix. |
This continues to be an issue. Now I tested it with the latest Julia v.1.10. The only way to resolve the problem is to use [email protected] I am not sure why the support for Linux and Mac are only provided. Many other users use Gadfly on Windows?! Is there a way to resolve the problem?! Please let me know. This has been outstanding for about 2 years now. |
I confirm that this is still an issue with the latest Pango_jll (Pango_jll v1.50.14+0) |
I wonder if the changes in Pango 1.51.x and 1.52.0 will fix things (https://github.com/GNOME/pango/blob/main/NEWS). |
I am also curious. It is just so painful at the moment to rely on old Pango versions. |
All these issues have been resolved with the latest version of Pango_jll. |
(@v1.7) pkg> st Gadfly
Status
C:\Users\monty\.julia\environments\v1.7\Project.toml
[c91e804a] Gadfly v1.3.4
(@v1.7) pkg> st Compose
Status
C:\Users\monty\.julia\environments\v1.7\Project.toml
[a81c6b42] Compose v0.9.3
The following produces very weird ouput:
Gadfly.draw(Gadfly.PNG("a.png", 3Gadfly.inch, 3Gadfly.inch), Gadfly.plot(x=rand(10), y=rand(10), Gadfly.Scale.y_sqrt, Gadfly.Geom.point, Gadfly.Guide.xlabel("Time"), Gadfly.Guide.ylabel("Response"), Gadfly.Guide.title("Test")))
The text was updated successfully, but these errors were encountered: