Skip to content
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

Obsolete warning when plotting contour lines in GR ? #4394

Closed
fhagemann opened this issue Sep 29, 2022 · 1 comment · Fixed by #4395
Closed

Obsolete warning when plotting contour lines in GR ? #4394

fhagemann opened this issue Sep 29, 2022 · 1 comment · Fixed by #4395
Labels

Comments

@fhagemann
Copy link
Contributor

When I use contourf with the backend gr(), it looks like I can choose the color of the contour lines arbitrarily.

using Plots; gr()
x = -10:0.1:10
y = -10:0.1:10
data = x.^2 .+ y'.^2
contourf(x, y, data', ratio = 1, seriescolor = :viridis, linecolor = :black, size = (510,500))

image

However, when I choose anything other than linecolor = :black, the contour lines appear in the color I want, but I get a warning that only black contour lines are supported.

using Plots; gr()
x = -10:0.1:10
y = -10:0.1:10
data = x.^2 .+ y'.^2
plot(
    [contourf(x, y, data', ratio = 1, seriescolor = :viridis, linecolor = c, size = (510,500)) for c in [:white, :red, :green, :blue]]...,
    size = (2000,2000)
)
 Warning: GR: filled contour only supported with black contour lines
└ @ Plots /user/.julia/packages/Plots/nbICw/src/backends/gr.jl:2036
 Warning: GR: filled contour only supported with black contour lines
└ @ Plots /user/.julia/packages/Plots/nbICw/src/backends/gr.jl:2036
 Warning: GR: filled contour only supported with black contour lines
└ @ Plots /user/.julia/packages/Plots/nbICw/src/backends/gr.jl:2036
 Warning: GR: filled contour only supported with black contour lines
└ @ Plots /user/.julia/packages/Plots/nbICw/src/backends/gr.jl:2036

image

Is this warning still needed?
Because it looks to me like filled contour is supported with any color contour lines..

Versions

Plots version: 1.34.3
Backend: GR 0.69.1
versioninfo():

Julia Version 1.8.0-rc1
Commit 6368fdc656 (2022-05-27 18:33 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 128 × AMD EPYC 7702P 64-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
  Threads: 32 on 128 virtual cores
@t-bltg t-bltg added the GR label Sep 29, 2022
@t-bltg
Copy link
Member

t-bltg commented Sep 29, 2022

I guess it's reasonable to remove this warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants