Skip to content

Commit

Permalink
Merge pull request #77 from adknudson/main
Browse files Browse the repository at this point in the history
add missing `transforms` variable in `geom_vline`
  • Loading branch information
rdboyes authored Apr 14, 2024
2 parents b70e3e6 + 52f6273 commit 0c17afe
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 79 deletions.
24 changes: 12 additions & 12 deletions src/geoms/geom_hvline.jl
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
function geom_hline(args...; kwargs...)
aes_dict, args_dict, transforms = extract_aes(args, kwargs)

args_dict["geom_name"] = "geom_hline"

if haskey(args_dict, "yintercept")
args_dict["data"] = DataFrame(Numeric = args_dict["yintercept"])
aes_dict["yintercept"] = :Numeric
end

return build_geom(aes_dict, args_dict,
return build_geom(aes_dict, args_dict,
["yintercept"], # required aesthetics
:HLines,
do_nothing,
transforms) # function for visual layer
do_nothing,
transforms) # function for visual layer
end

function geom_vline(args...; kwargs...)
aes_dict, args_dict = extract_aes(args, kwargs)
aes_dict, args_dict, transforms = extract_aes(args, kwargs)

args_dict["geom_name"] = "geom_vline"

if haskey(args_dict, "xintercept")
args_dict["data"] = DataFrame(Numeric = args_dict["xintercept"])
aes_dict["xintercept"] = :Numeric
end

return build_geom(aes_dict, args_dict,
return build_geom(aes_dict, args_dict,
["xintercept"], # required aesthetics
:VLines,
do_nothing,
transforms) # function for visual layer
do_nothing,
transforms) # function for visual layer
end

function geom_hline(plot::GGPlot, args...; kwargs...)
return plot + geom_hline(args...; kwargs...)
return plot + geom_hline(args...; kwargs...)
end

function geom_vline(plot::GGPlot, args...; kwargs...)
return plot + geom_vline(args...; kwargs...)
end
return plot + geom_vline(args...; kwargs...)
end
Loading

2 comments on commit 0c17afe

@rdboyes
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/104880

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.1 -m "<description of version>" 0c17afe802cf3e619c2ff84521b2adaf37940dfd
git push origin v0.7.1

Please # to comment.