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 Makie.jl recipes #123

Closed
wants to merge 4 commits into from
Closed

Add Makie.jl recipes #123

wants to merge 4 commits into from

Conversation

leonvonrabenmond
Copy link

Adds in the recipes for Makie.jl from #95.

src/plot-recipes.jl Outdated Show resolved Hide resolved
@leonvonrabenmond
Copy link
Author

So, this commit changes to MakieCore, which allows conversion of scatter, lines and similar (PointBased Plots). As far as I can tell, errorbars and band cannot be converted under MakieCore and require full Makie.

I will check if it is possible to somehow achieve that.

@alyaeanyx
Copy link

@giordano is there anything preventing this from being merged? This feature would be really nice to have while working with Makie.jl + Measurements.jl.

@giordano
Copy link
Member

giordano commented Dec 1, 2022

Making tests pass would be the very first thing. I'll never merge a PR with failing tests.

Makie.convert_arguments(P::Type{<:Band}, x::AbstractVector{<:Measurement}, y::AbstractVector{<:Measurement}) =
convert_arguments(P, value.(x), value.(y) - uncertainty.(y), value.(y) + uncertainty.(y))
Makie.convert_arguments(P::Type{<:Band}, x::AbstractVector{<:Real}, y::AbstractVector{<:Measurement}) =
convert_arguments(P, x, value.(y) - uncertainty.(y), value.(y) + uncertainty.(y))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing new line

Suggested change
convert_arguments(P, x, value.(y) - uncertainty.(y), value.(y) + uncertainty.(y))
convert_arguments(P, x, value.(y) - uncertainty.(y), value.(y) + uncertainty.(y))

@@ -17,30 +17,32 @@

using RecipesBase

@recipe function f(y::AbstractArray{<:Measurement})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this file changed at all?

@@ -67,7 +67,8 @@ easy-to-use calculator.
measurements with their physical units, perform numerical integration
with [`QuadGK.jl`](https://github.com/JuliaMath/QuadGK.jl), numerical and
automatic differentiation, and much more.
* Integration with [`Plots.jl`](https://github.com/JuliaPlots/Plots.jl).
* Integration with [`Plots.jl`](https://github.com/JuliaPlots/Plots.jl) and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -126,4 +126,8 @@ include("show.jl")
include("parsing.jl")
include("plot-recipes.jl")

function __init__()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already an __init__ function.

@alyaeanyx
Copy link

alyaeanyx commented Dec 1, 2022

Making tests pass would be the very first thing. I'll never merge a PR with failing tests.

Oh, didn't notice that. Sorry.

@giordano
Copy link
Member

I think this would be better implemented as a package extension: #133.

@giordano
Copy link
Member

Closing in favour of #145

@giordano giordano closed this May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants