Skip to content

GR backend: use textext for :log2 and :ln axis scaling #4991

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

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,10 @@
"affiliation": "The Alan Turing Institute",
"name": "Penelope Yong",
"type": "Other"
},
{
"name": "Patrick Jaap",
"type": "Other"
}
],
"upload_type": "software"
Expand Down
4 changes: 2 additions & 2 deletions src/backends/gr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ end

gr_inqtext(x, y, s) = gr_inqtext(x, y, string(s))
gr_inqtext(x, y, s::AbstractString) =
if (occursin('\\', s) || occursin("10^{", s)) &&
if (occursin('\\', s) || occursin(r"10\^{|2\^{|e\^{", s)) &&
match(r".*\$[^\$]+?\$.*", String(s)) === nothing
GR.inqtextext(x, y, s)
else
Expand All @@ -259,7 +259,7 @@ gr_inqtext(x, y, s::AbstractString) =

gr_text(x, y, s) = gr_text(x, y, string(s))
gr_text(x, y, s::AbstractString) =
if (occursin('\\', s) || occursin("10^{", s)) &&
if (occursin('\\', s) || occursin(r"10\^{|2\^{|e\^{", s)) &&
match(r".*\$[^\$]+?\$.*", String(s)) === nothing
GR.textext(x, y, s)
else
Expand Down
Loading