-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Categorical colormaps for meshes/poly or contour plots on meshes #3863
Comments
What you ask for will work in GLMakie but not in CairoMakie, since vector graphics standards only support interpolation over colours in meshes and not values. |
Thank you for your answer @asinghvi17 . Can you tell me how this would work or guide me to an example somewhere? I want to achieve something like that (which is, I think, a standard way to do color plots for field results) For the latter, I refined the mesh to 3_066_880 elements and provided a constant color for each element, which looks okay but is not perfect. |
Hmm, in this case I would use As you saw, GLMakie will do the interpolation correctly, but if you need a vector renderer then |
Hey @asinghvi17 thanks again for your answer. vertices = Point2f[ ... ]
indices = Tuple{Int,Int,Int}[(1,2,3),(2,3,4),...]
vertexcolors = rand(Float64, length(vertices))
tricontourf(vertices, indices, color=vertexcolors) That would be so easy and convenient. I looked in the recipe, but it would be hard for me to alter. Maybe there is a different solution? |
Maybe @DanielVandH could clarify |
The
Just make your |
Thank you very much. This is what I was looking for. Closing this for now... |
@asinghvi17 @jkrumbiegel @DanielVandH Got figured it out. |
Feature description
Hello,
first of all: Makie.jl is a great package. Thank you guys for your efforts.
What I would like to do is plot contours on a mesh or a poly.
It seems like Makie is converting the
color = colrs
-values to colors first and then do an interpolation of the colors for each pixel in the triangle.I would like to have it the other way around. First do an interpolation of the
color = colrs
-values and then transform it to a color according to the colormap.Is there a way to do this in Makie right now?
Thx in advance.
Graetz max
The text was updated successfully, but these errors were encountered: