-
Notifications
You must be signed in to change notification settings - Fork 78
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
Plots, GR backend & math in titles #512
Comments
Could you please provide a MWE? Thanks. |
Could you please execute the following commands and provide a screenshot? using GR
using LaTeXStrings
text(0.1, 0.9, L"this is $f(x)$")
text(0.1, 0.8, L"$\sin$ as a function of $x$")
text(0.1, 0.7, L"position $x$")
text(0.1, 0.6, L"mapping $\sin(x)$")
settextfontprec(232, 3)
text(0.1, 0.4, L"this is $f(x)$")
text(0.1, 0.3, L"$\sin$ as a function of $x$")
text(0.1, 0.2, L"position $x$")
text(0.1, 0.1, L"mapping $\sin(x)$")
updatews() |
Will do when I'm back at computer.
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Josef Heinen ***@***.***>
Sent: Monday, February 27, 2023 7:01:28 PM
To: jheinen/GR.jl ***@***.***>
Cc: Bernt Lie ***@***.***>; Author ***@***.***>
Subject: Re: [jheinen/GR.jl] Plots, GR backend & math in titles (Issue #512)
Could you please execute the following commands and provide a screenshot?
using GR
using LaTeXStrings
text(0.1, 0.9, L"this is $f(x)$")
text(0.1, 0.8, L"$\sin$ as a function of $x$")
text(0.1, 0.7, L"position $x$")
text(0.1, 0.6, L"mapping $\sin(x)$")
settextfontprec(232, 3)
text(0.1, 0.4, L"this is $f(x)$")
text(0.1, 0.3, L"$\sin$ as a function of $x$")
text(0.1, 0.2, L"position $x$")
text(0.1, 0.1, L"mapping $\sin(x)$")
updatews()
—
Reply to this email directly, view it on GitHub<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjheinen%2FGR.jl%2Fissues%2F512%23issuecomment-1446796574&data=05%7C01%7C%7C512e1c59067042ea4f4208db18eca6c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638131176910587967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VADlLo17gQe7sA2Z9Xyowfy6UTOyCdWUy8pB7xcU3xM%3D&reserved=0>, or unsubscribe<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAM5VM7ZH4SGXJSTJJEG7EM3WZTTXRANCNFSM6AAAAAAVJEGWHQ&data=05%7C01%7C%7C512e1c59067042ea4f4208db18eca6c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638131176910587967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mrpnj2xhL98LW2DQAKu1VrlpN7H3kZcEm2O%2BJsgmHUc%3D&reserved=0>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
You can run these commands only in a console window. |
I have no explanation yet why the alignment depends so much on the font - with plain GR text (and without embedded LaTeX strings) the positioning in GR is pixel-precise. We will have a closer look at this ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems like there is a slight problem with the GR back-end of Plots when it comes to math in titles. Here is an example:
Notice that the math does not align well with the non-math text (e.g., the$N$ at the end is too low; the same is true of the other math). Also observe that here, I inserted word "and" in the math part; if I didn't do that, it looked considerably worse.
Apart from this, I'm very happy with the GR package (OK -- there may be other minor issues). I stopped using the PyPlot backend some time ago -- essentially because (i) it stopped working properly, and (ii) GR gave crisper lines, and overall nicer looking plots.
The text was updated successfully, but these errors were encountered: