Conversation
pjaap
reviewed
Apr 14, 2026
| ex = extrema(view(coords, 1, :)) | ||
| ey = extrema(view(coords, 2, :)) | ||
|
|
||
| X = LinRange(ex[1], ex[2], resolution[1]) |
Member
There was a problem hiding this comment.
I played a bit around and this throws errors on my end, since resolution may have floating point values. LinRange only accepts integers for the third argument. collect(ex[1]:(1/ resolution[1]):ex[2])?
Member
There was a problem hiding this comment.
Or just resolution = @. Int(round(ctx[:size]))
Member
Author
There was a problem hiding this comment.
Ok, I incorporated your suggestion
pjaap
reviewed
Apr 14, 2026
| ) | ||
|
|
||
| func = funcs[1] | ||
| resolution = resolution = @. Int(round(ctx[:size])) |
8ab3d70 to
3e7c513
Compare
3e7c513 to
bad8fb2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I started with a UnicodePlots extension and first moved the gridplot! from ExtandableFEMBase over. I tried to use as many ctx kwargs as possible and also added a proper bface coloring that was missing before. I also added a legend for the cell and bface colors. CellRegions coloring in 2D at the moment works by coloring a pixel at the cell midpoints. Also, at the moment the function just returns the plot which should cause a write into the terminal. Later this should be done by reveal, I guess.
You can test it with
GridVisualize.gridplot(uniform_refine(grid_lshape(Triangle2D)); Plotter = UnicodePlots, size = (40,20), aspect = 1, color = :yellow, title = "gridplot")The 2D scalarplot works via Extendable.interpolate! onto a rectangular simplexgrid. Wtih WIAS-PDELib/ExtendableGrids.jl#120 this also works if the real grid is not rectangular.
UnicodePlots also offers something like a layout to group several plots... but that is for later ^^