ENV["JULIA_GR_PROVIDER"] = "BinaryBuilder"
(in GR#master), but there are still some issues.
This is probably related to Plots. As a workaround, you can force GR to use GKSTerm as the default output device using the
GKSwstype
environment (in your script or in your shell):ENV["GKSwstype"]="gksqt"
I was using Julia 1.2.0 in Win 10 . and run into the problem that when I plot with GR it show the error message that
GKS: X11 support not compiled in
the command I quote is useful, thanks!
GKS: Qt5 support not compiled in
. See also barche/QML.jl#107. Is there an easy way to fix that? Thanks
function rotate(x, y, angle)
θ = angle * π / 180
x .* cos(θ) - y .* sin(θ), x .* sin(θ) + y .* cos(θ)
end
function drawellipse(x, y, angle, a, b)
p = [ 0 1 0.5523 1 1 0.5523 1 0 1 -0.5523 0.5523 -1 0 -1 -0.5523 -1 -1 -0.5523 -1 0 -1 0.5523 -0.5523 1 0 1 ]
Δx, Δy = rotate(p[1:2:end] .* a, p[2:2:end] .* b, angle)
path(x .+ Δx, y .+ Δy, "MCCCCf")
end
0.5523
is from, plus changed f: close path and fill
to s: close path and stroke
, I made the modifications to GRUtils.jl by adding ellipse. Will send you the modification for review on the GRUtils.jl github page, if that is OK? I also have a question:
ellipse(x, y, angle, a, b; kwargs...])
ellipse([x, y, angle, a, b]; kwargs...)
Draw an ellipse with points i,j
and major and minor axes a,b
centered at x,y
: $\frac{(i - x)^2}{a^2} + \frac{(j - y)^2}{b^2} = 1$
linewidth
: line width scale factor.linecolor
: hexadecimal RGB color code for the line.example:
ellipse([3.25, +1.25, 35.0, -1.2, +.8], linewidth=2, xlabel="xlabel", ylabel="ylabel", xlim=(0.0, 4.0), ylim=(0, 3.0))
ellipse(3.25, +1.25, 35.0, -.2, +.2, linewidth=2, xlabel="xlabel", ylabel="ylabel", xlim=(0.0, 4.0), ylim=(0.,3.0))
within geometries.jl
function rotate_ellipse_(x, y, angle)
θ = angle * π / 180
x .* cos(θ) - y .* sin(θ), x .* sin(θ) + y .* cos(θ)
end
function draw(g::Geometry, ::Val{:ellipse})::Nothing
GR.setborderwidth(float(get(g.attributes, :linewidth, 1.0)))
GR.setbordercolorind(1)
x,y, angle, a, b = g.x[1], g.x[2], g.x[3], g.x[4], g.x[5]
# constant 0.55228474 = 4.0*tan(π/8)/3.0 = 4.0*tan(π/8)/3.
p = [ 0 1 0.55228474 1 1 0.55228474 1 0 1 -0.55228474 0.55228474 -1 0 -1 -0.55228474 -1 -1 -0.55228474 -1 0 -1 0.55228474 -0.55228474 1 0 1 ]
Δx, Δy = rotate_ellipse_(p[1:2:end] .* a, p[2:2:end] .* b, angle)
GR.path(x .+ Δx, y .+ Δy, "MCCCCs")
return nothing
end
I just installed gr manually to local. But the Julia installation keeps on insisting to download:
┌ Error: Error building GR
:
│ tar (child): downloads/gr-0.55.0-Linux-aarch64.tar.gz: Cannot open: No such file or directory
│ tar (child): Error is not recoverable: exiting now
│ tar: Child returned status 2
│ tar: Error is not recoverable: exiting now
│ [ Info: Downloading pre-compiled GR 0.55.0 Linux binary
│ ┌ Error: Download failed: curl: (22) The requested URL returned error: 404
│ └ @ Base download.jl:43
│ ┌ Error: Download failed: curl: (22) The requested URL returned error: 404
│ └ @ Base download.jl:43
│ [ Info: Using insecure connection
│ ┌ Error: Download failed: curl: (22) The requested URL returned error: 404
│ └ @ Base download.jl:43
│ [ Info: Cannot download GR run-time
│ ERROR: LoadError: failed process: Process(tar xzf downloads/gr-0.55.0-Linux-aarch64.tar.gz
, ProcessExited(2)) [2]
\mathit{}
macro is ignored with the builtin renderer.
Hi Josef, many thanks for looking into this. I'm sending you the complete /etc/os-release data:
NAME="Arch Linux ARM"
PRETTY_NAME="Arch Linux ARM"
ID=archarm
ID_LIKE=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinuxarm.org/"
DOCUMENTATION_URL="https://archlinuxarm.org/wiki"
SUPPORT_URL="https://archlinuxarm.org/forum"
BUG_REPORT_URL="https://github.com/archlinuxarm/PKGBUILDs/issues"
LOGO=archlinux
What should the value the $key variable be? Best, Mike