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

Add triplot and voronoiplot from DelaunayTriangulation.jl #3102

Closed
wants to merge 146 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
01f4eec
Add the new plot recipes
DanielVandH Jul 28, 2023
cde45b3
Use RNG
DanielVandH Jul 28, 2023
4296952
Shrink the default markersize
DanielVandH Jul 28, 2023
26b1d11
Don't need the name reference
DanielVandH Jul 28, 2023
1f02ae0
Fixed the wrong file for DelaunayTriangulation ref
DanielVandH Jul 28, 2023
d053626
Add needs_tight_limits for triplot/voronoiplot, and add bounding boxe…
DanielVandH Jul 28, 2023
82e87c0
Dropped a name
DanielVandH Jul 28, 2023
cc7d0ec
News
DanielVandH Jul 28, 2023
0124797
Missing RNG
DanielVandH Jul 28, 2023
7ace10f
Merge branch 'master' into delaunay_recipes
SimonDanisch Jul 31, 2023
c82c404
Update to the new DelaunayTriangulation release, and add customiable …
DanielVandH Aug 1, 2023
a8ea646
Left in deved folders accidentally
DanielVandH Aug 1, 2023
4ea12bd
Fix some other edge cases
DanielVandH Aug 1, 2023
3a18d85
Missed a nothing check
DanielVandH Aug 1, 2023
0ef0174
Wait a bit longer to convert the bounding box coordinates
DanielVandH Aug 1, 2023
56e6c59
Add doc pages
DanielVandH Aug 2, 2023
3b7ee8b
allow passing PointBased data to voronoiplot
ffreyer Aug 5, 2023
fbd2df6
make show_generators updateable
ffreyer Aug 5, 2023
677d1a5
simplify conversion
ffreyer Aug 5, 2023
c7ff696
fix conversions, type error, add color passthrough
ffreyer Aug 5, 2023
6c1ecd8
fix error due to plot nesting
ffreyer Aug 5, 2023
dfd12d0
rename polygon_color -> color
ffreyer Aug 5, 2023
943ecd1
fix tests failure
ffreyer Aug 5, 2023
b86e809
roll back color name change
ffreyer Aug 5, 2023
ea6acc0
Make sure color order gets respected
DanielVandH Aug 7, 2023
afc13b5
Add conversiosn for triplot, and some more tests
DanielVandH Aug 7, 2023
099cdf3
Remove N
DanielVandH Aug 7, 2023
fa3cf41
Merge branch 'master' into delaunay_recipes
DanielVandH Aug 7, 2023
4ff764a
Tense
DanielVandH Aug 7, 2023
40d307c
rename polygon_color to color & simplify
ffreyer Aug 7, 2023
904be7a
get Colorbar working
ffreyer Aug 7, 2023
9c0d1ef
mention voronoiplot in PolarAxis docs
ffreyer Aug 7, 2023
509bd92
document other plot signatures
ffreyer Aug 7, 2023
f9e272e
add PointBased conversions for multiple Matrices
ffreyer Aug 7, 2023
cef01da
prototype default boundingbox alternative
ffreyer Aug 7, 2023
343be62
update docs
ffreyer Aug 7, 2023
a110cd6
fix polygon_color in docstring
ffreyer Aug 7, 2023
59cd340
simplify docs
ffreyer Aug 7, 2023
f8488a5
tweak docstring, scatter render
ffreyer Aug 7, 2023
bed9675
point_color -> markercolor, render order tweaks
ffreyer Aug 7, 2023
23b0470
show off triangle_color
ffreyer Aug 7, 2023
8da99ef
fix color hanbdling, tweak render order in GLMakie
ffreyer Aug 7, 2023
a7684d9
cleanup tests
ffreyer Aug 7, 2023
22a73b9
prototype arbitrary bounding boxes
ffreyer Aug 9, 2023
cd4a520
prototype circle clipping
ffreyer Aug 9, 2023
c6070c1
Fix empty polygon plotting
DanielVandH Aug 11, 2023
bdafb2f
Merge branch 'master' into empty-poly-fix
DanielVandH Aug 11, 2023
503e36c
Change some of the defaults, remove old clipping code
DanielVandH Aug 11, 2023
7b65b48
Fix news
DanielVandH Aug 11, 2023
4c98b71
Test custom bounding boxes
DanielVandH Aug 11, 2023
a0e052c
simplify conversion
ffreyer Aug 11, 2023
3d450f5
minor test tweaks
ffreyer Aug 11, 2023
d5eb28e
clip generators to bbox
ffreyer Aug 11, 2023
4d7454a
allow Rect2 bounding boxes and mixed type tuples
ffreyer Aug 11, 2023
606ae27
bring circle clip back & use it by default for PolarAxis
ffreyer Aug 11, 2023
cfa185d
undo generator clipping change
ffreyer Aug 11, 2023
f7009b8
Language in docs
DanielVandH Aug 11, 2023
1abe66b
Remove reverse!(cs) so that moving a point slightly gives consistent …
DanielVandH Aug 12, 2023
06d8ac8
Add tests with observables
DanielVandH Aug 12, 2023
a00c886
Undo reverse! change until consistent rule for local colors implemented
DanielVandH Aug 12, 2023
65e4cd7
fix test failure
ffreyer Aug 12, 2023
7a75b0f
clean up observable bookkeeping
ffreyer Aug 12, 2023
a0d2ec0
clean up observable updates
ffreyer Aug 12, 2023
916ba5a
cleanup map in refimg
ffreyer Aug 12, 2023
9ce664d
merge refimg
ffreyer Aug 12, 2023
a6dc951
simplify refimg test
ffreyer Aug 12, 2023
280cccc
replace color sorting refimg with unit test
ffreyer Aug 13, 2023
4087c77
- Use better default markersize
DanielVandH Aug 13, 2023
8b8df26
Fix triplot for disjoint domains
DanielVandH Aug 14, 2023
6545b55
Fix interior curve detection
DanielVandH Aug 14, 2023
238e691
Use method from DT for detecting interior curves
DanielVandH Aug 15, 2023
b7ab44b
Merge branch 'master' into delaunay_recipes
SimonDanisch Aug 15, 2023
c2faa77
Remove global declaration
DanielVandH Aug 15, 2023
a53733c
Wasn't supposed to be a testset
DanielVandH Aug 15, 2023
31602f0
Add the new plot recipes
DanielVandH Jul 28, 2023
2d87c90
Use RNG
DanielVandH Jul 28, 2023
35e0412
Shrink the default markersize
DanielVandH Jul 28, 2023
f55fb50
Don't need the name reference
DanielVandH Jul 28, 2023
2158156
Fixed the wrong file for DelaunayTriangulation ref
DanielVandH Jul 28, 2023
4f40f82
Add needs_tight_limits for triplot/voronoiplot, and add bounding boxe…
DanielVandH Jul 28, 2023
19c7a28
Dropped a name
DanielVandH Jul 28, 2023
73cca99
News
DanielVandH Jul 28, 2023
fecba4e
Missing RNG
DanielVandH Jul 28, 2023
6c5422d
Update to the new DelaunayTriangulation release, and add customiable …
DanielVandH Aug 1, 2023
65f5bd1
Left in deved folders accidentally
DanielVandH Aug 1, 2023
ea7d264
Fix some other edge cases
DanielVandH Aug 1, 2023
9dd3f3a
Missed a nothing check
DanielVandH Aug 1, 2023
b62d318
Wait a bit longer to convert the bounding box coordinates
DanielVandH Aug 1, 2023
b39ffc6
Add doc pages
DanielVandH Aug 2, 2023
cdbae3e
allow passing PointBased data to voronoiplot
ffreyer Aug 5, 2023
5f4e502
make show_generators updateable
ffreyer Aug 5, 2023
59c8592
simplify conversion
ffreyer Aug 5, 2023
2e55374
fix conversions, type error, add color passthrough
ffreyer Aug 5, 2023
4ce39c7
fix error due to plot nesting
ffreyer Aug 5, 2023
97efcc5
rename polygon_color -> color
ffreyer Aug 5, 2023
d9306c9
fix tests failure
ffreyer Aug 5, 2023
7c1c0ba
roll back color name change
ffreyer Aug 5, 2023
b953b95
Make sure color order gets respected
DanielVandH Aug 7, 2023
93b77e8
Add conversiosn for triplot, and some more tests
DanielVandH Aug 7, 2023
b6b7701
Remove N
DanielVandH Aug 7, 2023
6bf6993
Tense
DanielVandH Aug 7, 2023
1a1ee67
rename polygon_color to color & simplify
ffreyer Aug 7, 2023
80a7eb6
get Colorbar working
ffreyer Aug 7, 2023
429c70c
mention voronoiplot in PolarAxis docs
ffreyer Aug 7, 2023
b28f7a6
document other plot signatures
ffreyer Aug 7, 2023
f59da3a
add PointBased conversions for multiple Matrices
ffreyer Aug 7, 2023
3ae75b9
prototype default boundingbox alternative
ffreyer Aug 7, 2023
4c12e05
update docs
ffreyer Aug 7, 2023
1b7d00d
fix polygon_color in docstring
ffreyer Aug 7, 2023
8f771be
simplify docs
ffreyer Aug 7, 2023
c0ca368
tweak docstring, scatter render
ffreyer Aug 7, 2023
b147da0
point_color -> markercolor, render order tweaks
ffreyer Aug 7, 2023
29aafae
show off triangle_color
ffreyer Aug 7, 2023
8d3f8c5
fix color hanbdling, tweak render order in GLMakie
ffreyer Aug 7, 2023
07dddb1
cleanup tests
ffreyer Aug 7, 2023
16fc9b7
prototype arbitrary bounding boxes
ffreyer Aug 9, 2023
ef52aff
prototype circle clipping
ffreyer Aug 9, 2023
e805de8
Change some of the defaults, remove old clipping code
DanielVandH Aug 11, 2023
016740c
Fix empty polygon plotting
DanielVandH Aug 11, 2023
749d3b8
Test custom bounding boxes
DanielVandH Aug 11, 2023
371d3e3
simplify conversion
ffreyer Aug 11, 2023
327e94c
minor test tweaks
ffreyer Aug 11, 2023
41ba5ff
clip generators to bbox
ffreyer Aug 11, 2023
5aaae4d
allow Rect2 bounding boxes and mixed type tuples
ffreyer Aug 11, 2023
14691bb
bring circle clip back & use it by default for PolarAxis
ffreyer Aug 11, 2023
b0424fb
undo generator clipping change
ffreyer Aug 11, 2023
1211fbb
Language in docs
DanielVandH Aug 11, 2023
890765d
Remove reverse!(cs) so that moving a point slightly gives consistent …
DanielVandH Aug 12, 2023
8148be1
Add tests with observables
DanielVandH Aug 12, 2023
dbd9da1
Undo reverse! change until consistent rule for local colors implemented
DanielVandH Aug 12, 2023
6e0d6d0
fix test failure
ffreyer Aug 12, 2023
bf02721
clean up observable bookkeeping
ffreyer Aug 12, 2023
bae3e60
clean up observable updates
ffreyer Aug 12, 2023
6ef2a1b
cleanup map in refimg
ffreyer Aug 12, 2023
617dbda
merge refimg
ffreyer Aug 12, 2023
880a530
simplify refimg test
ffreyer Aug 12, 2023
1d17164
replace color sorting refimg with unit test
ffreyer Aug 13, 2023
c55f069
- Use better default markersize
DanielVandH Aug 13, 2023
9dd2fbf
Fix triplot for disjoint domains
DanielVandH Aug 14, 2023
c57ce0a
Fix interior curve detection
DanielVandH Aug 14, 2023
f8aecd4
Use method from DT for detecting interior curves
DanielVandH Aug 15, 2023
32e7c56
Remove global declaration
DanielVandH Aug 15, 2023
a58f1a2
Wasn't supposed to be a testset
DanielVandH Aug 15, 2023
fde2200
update name to not error
SimonDanisch Aug 15, 2023
55c2201
fix typo
ffreyer Aug 15, 2023
cba885d
Merge branch 'delaunay_recipes' of https://github.com/DanielVandH/Mak…
DanielVandH Aug 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Expand Up @@ -7,6 +7,7 @@
- Added `xreversed`, `yreversed` and `zreversed` attributes to `Axis3` [#3138](https://github.com/MakieOrg/Makie.jl/pull/3138).
- Fixed incorrect placement of contourlabels with transform functions [#3083](https://github.com/MakieOrg/Makie.jl/pull/3083)
- Fixed automatic normal generation for meshes with shading and no normals [#3041](https://github.com/MakieOrg/Makie.jl/pull/3041).
- Added the `triplot` and `voronoiplot` recipes from DelaunayTriangulation.jl [#3102](https://github.com/MakieOrg/Makie.jl/pull/3102).

## v0.19.7

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Expand Up @@ -65,7 +65,7 @@ ColorSchemes = "3.5"
ColorTypes = "0.8, 0.9, 0.10, 0.11"
Colors = "0.9, 0.10, 0.11, 0.12"
Contour = "0.5, 0.6"
DelaunayTriangulation = "0.6.2, 0.7"
DelaunayTriangulation = "0.8.7"
Distributions = "0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
DocStringExtensions = "0.8, 0.9"
FFMPEG = "0.2, 0.3, 0.4"
Expand Down
79 changes: 20 additions & 59 deletions README.md
Expand Up @@ -3,50 +3,32 @@
<source media="(prefers-color-scheme: dark)"
srcset="/assets/makie_logo_canvas_dark.svg" >
<img alt="Makie.jl logo"
src="/assets/makie_logo_canvas.svg" width="250">
src="/assets/makie_logo_canvas.svg" width="400">
</picture>
</div>

<div align="center">

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/MakieOrg/Makie.jl/blob/main/LICENSE)
[![][docs-stable-img]][docs-stable-url] [![][docs-master-img]][docs-master-url][![JOSS][joss-img]][joss-url]
[![Build Status](https://github.com/MakieOrg/Makie.jl/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/MakieOrg/Makie.jl/actions/workflows/ci.yml?query=branch%3Amaster)
[![](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40MakiePlots)](https://twitter.com/MakiePlots)
[![chat][discord-img]][discord-url]
[![Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/Makie&label=Downloads)](https://pkgs.genieframework.com?packages=Makie)

</div>

From the japanese word [_Maki-e_](https://en.wikipedia.org/wiki/Maki-e), which is a technique to sprinkle lacquer with gold and silver powder.
Data is the gold and silver of our age, so let's spread it out beautifully on the screen!

[Check out the documentation here!](http://docs.makie.org/stable/)

[![][docs-stable-img]][docs-stable-url] [![][docs-master-img]][docs-master-url] [![](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40MakiePlots)](https://twitter.com/MakiePlots)


[gitlab-img]: https://gitlab.com/JuliaGPU/Makie.jl/badges/master/pipeline.svg
[gitlab-url]: https://gitlab.com/JuliaGPU/Makie.jl/pipelines
[docs-stable-img]: https://img.shields.io/badge/docs-stable-lightgrey.svg
[docs-stable-url]: http://docs.makie.org/stable/
[docs-master-img]: https://img.shields.io/badge/docs-master-blue.svg
[docs-master-url]: http://docs.makie.org/dev/
[joss-url]: https://doi.org/10.21105/joss.03349
[joss-img]: http://joss.theoj.org/papers/10.21105/joss.03349/status.svg

[discord-url]: https://discord.com/invite/2FBjYAT3cY
[discord-img]: https://img.shields.io/discord/996787732149981214.svg?logo=discord&colorB=7289DA&style=flat-square

## Citing Makie
# Citing Makie

If you use Makie for a scientific publication, please cite [our JOSS paper](https://joss.theoj.org/papers/10.21105/joss.03349) the following way:

```
Danisch & Krumbiegel, (2021). Makie.jl: Flexible high-performance data visualization for Julia.
Journal of Open Source Software, 6(65), 3349, https://doi.org/10.21105/joss.03349
```
> Danisch & Krumbiegel, (2021). Makie.jl: Flexible high-performance data visualization for Julia. Journal of Open Source Software, 6(65), 3349, https://doi.org/10.21105/joss.03349


<details>
<summary>BibTeX entry:</summary>
BibTeX entry:

```bib
@article{DanischKrumbiegel2021,
Expand All @@ -62,15 +44,10 @@ Journal of Open Source Software, 6(65), 3349, https://doi.org/10.21105/joss.0334
journal = {Journal of Open Source Software}
}
```
</details>

or [Download the BibTeX file](./assets/DanischKrumbiegel2021.bibtex).

## Community Channels

We are on [Discord](https://discord.com/invite/2FBjYAT3cY) and [Discourse](https://discourse.julialang.org/c/17?tags=Makie)! Community channels are a great way for you to ask questions and get help. Please join us!

## Installation
# Installation

Please consider using the backends directly. As explained in the documentation, they re-export all of Makie's functionality.
So, instead of installing Makie, just install e.g. GLMakie directly:
Expand All @@ -94,9 +71,6 @@ using GLMakie

## Developing Makie

<details>
<summary><span style="color:red"> 🔥 Click for more 🔥</span></summary>

Makie and its backends all live in the Makie monorepo.
This makes it easier to change code across all packages.
Therefore, dev'ing Makie almost works as with other Julia packages, just, that one needs to also dev the sub packages:
Expand All @@ -111,21 +85,18 @@ To run the tests, you also should add:
]dev dev/Makie/ReferenceTests
```
For more info about ReferenceTests, check out its [README](./ReferenceUpdater/README.md)
</details>

## Examples
# Quick start

The following examples are supposed to be self-explanatory. For further information [check out the documentation!](http://docs.makie.org/stable/)

### A simple parabola

```julia
x = 1:0.1:10
fig = lines(x, x.^2; label = "Parabola",
axis = (; xlabel = "x", ylabel = "y", title ="Title"),
figure = (; resolution = (800,600), fontsize = 22))
axislegend(; position = :lt)
save("./assets/parabola.png", fig)
x = 1:10
fig = lines(x, x.^2; label = "Parabola")
axislegend()
save("./assets/parabola.png", fig, resolution = (600, 400))
fig
```

Expand All @@ -134,14 +105,10 @@ fig
### A more complex plot with unicode characters and LaTeX strings:
[Similar to the one on this link](<https://github.com/gcalderone/Gnuplot.jl#a-slightly-more-complex-plot-with-unicode-on-x-tics>)

<details>
<summary>Show Code</summary>

```julia
x = -2pi:0.1:2pi
approx = fill(0.0, length(x))
cmap = [:gold, :deepskyblue3, :orangered, "#e82051"]
set_theme!(palette = (; patchcolor = cgrad(cmap, alpha=0.45)))
set_theme!(palette = (; patchcolor = cgrad(:Egypt, alpha=0.65)))
fig, axis, lineplot = lines(x, sin.(x); label = L"sin(x)", linewidth = 3, color = :black,
axis = (; title = "Polynomial approximation of sin(x)",
xgridstyle = :dash, ygridstyle = :dash,
Expand All @@ -155,40 +122,34 @@ band!(x, sin.(x), approx .+= x .^ 5 / 120; label = L"n = 2")
band!(x, sin.(x), approx .+= -x .^ 7 / 5040; label = L"n = 3")
limits!(-3.8, 3.8, -1.5, 1.5)
axislegend(; position = :ct, bgcolor = (:white, 0.75), framecolor = :orange)
save("./assets/approxsin.png", fig, resolution = (800, 600))
save("./assets/approxsin.png", fig, resolution = (600, 400))
fig
```
</details>

<img src="./assets/approxsin.png">

### Simple layout: Heatmap, contour and 3D surface plot

<details>
<summary>Show Code</summary>

```julia
x = y = -5:0.5:5
z = x .^ 2 .+ y' .^ 2
cmap = :plasma
set_theme!(colormap = cmap)
fig = Figure(fontsize = 22)
set_theme!(colormap = :Hiroshige)
fig = Figure()
ax3d = Axis3(fig[1, 1]; aspect = (1, 1, 1),
perspectiveness = 0.5, azimuth = 2.19, elevation = 0.57)
ax2d = Axis(fig[1, 2]; aspect = 1, xlabel = "x", ylabel="y")
ax2d = Axis(fig[1, 2]; aspect = 1)
pltobj = surface!(ax3d, x, y, z; transparency = true)
heatmap!(ax2d, x, y, z; colormap = (cmap, 0.65))
heatmap!(ax2d, x, y, z; colormap = (:Hiroshige, 0.5))
contour!(ax2d, x, y, z; linewidth = 2, levels = 12, color = :black)
contour3d!(ax3d, x, y, z; linewidth = 4, levels = 12,
transparency = true)
Colorbar(fig[1, 3], pltobj; label="z", labelrotation=pi)
Colorbar(fig[1, 3], pltobj)
colsize!(fig.layout, 1, Aspect(1, 1.0))
colsize!(fig.layout, 2, Aspect(1, 1.0))
resize_to_layout!(fig)
save("./assets/simpleLayout.png", fig)
fig
```
</details>

<img src="./assets/simpleLayout.png">

Expand Down