Repository navigation
Add Makie package extension for plotting IntervalBoxes - #10
Merged
Merged
Conversation
Add a weak dependency on Makie with a package extension that enables
plotting 2D IntervalBoxes as rectangles via poly(). The extension
converts IntervalBox{2} to Rect2f and integrates with Makie's
convert_arguments system.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Define a @recipe PlotIntervalBox that decomposes into poly!(), supporting both single IntervalBox{2} and vectors. Users can now call: plot(box) plot(boxes) plotintervalbox(box) plotintervalbox!(ax, boxes) The poly() convert_arguments methods are kept as well. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Define a @recipe for IntervalBox{2} that draws rectangles using Plots.jl's :shape seriestype. Supports both single boxes and vectors. Usage: using Plots, IntervalBoxes, IntervalArithmetic plot(interval(0,1) × interval(0,1)) plot([interval(0,1) × interval(0,1), interval(2,3) × interval(1,2)]) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…v0.3.1 IntervalArithmetic v1 throws InconclusiveBooleanOperation instead of ArgumentError when comparing intervals with ==. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The ∈ methods were not extending Base.in because ∈ was missing from the Base imports. This caused Base.in to use its default iteration path, which called == on intervals and threw InconclusiveBooleanOperation on Julia 1.12+. Fix: add ∈ to `import Base`, add a specific method for IntervalType to throw ArgumentError, and remove the duplicate AbstractVector method from intervalbox.jl (already defined in arithmetic.jl). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
IntervalBoxesMakieExt)IntervalBoxes as rectangles viapoly()by definingMakie.convert_argumentsmethodsIntervalBox{2}toRect2fand integrates with Makie's existingPolyplot typeUsage
Test plan
IntervalBoxesloads without Makie (extension isnothing)🤖 Generated with Claude Code