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

Don't propagate widening axis limits for pipeline recipes #3619

Merged
merged 3 commits into from
Jul 6, 2021

Conversation

t-bltg
Copy link
Member

@t-bltg t-bltg commented Jul 5, 2021

The bug described in #3451 is triggered by https://github.com/JuliaPlots/RecipesPipeline.jl/blob/d11dcb642340c4bbe4068130d09597b54c079bcd/src/user_recipe.jl#L249.

Applying a function without x values should only be applied on the initial x data, not on the widened axis data (causing log to fails with NaNs on negative values).

Fix #3451.

Mwe

using Plots; gr()

main() = begin
  plot([.1, 5], [5, .1], yscale=:log10)
  plot!(identity)
  png("bug")
end

main()

Output

grault

@t-bltg t-bltg marked this pull request as draft July 5, 2021 20:06
@codecov
Copy link

codecov bot commented Jul 5, 2021

Codecov Report

Merging #3619 (e620730) into master (0122d70) will decrease coverage by 1.72%.
The diff coverage is 14.48%.

❗ Current head e620730 differs from pull request most recent head 909ad33. Consider uploading reports for the commit 909ad33 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3619      +/-   ##
==========================================
- Coverage   65.15%   63.42%   -1.73%     
==========================================
  Files          27       28       +1     
  Lines        6672     6841     +169     
==========================================
- Hits         4347     4339       -8     
- Misses       2325     2502     +177     
Impacted Files Coverage Δ
src/backends.jl 61.06% <0.00%> (-2.25%) ⬇️
src/backends/gaston.jl 0.00% <0.00%> (ø)
src/backends/gr.jl 89.12% <100.00%> (+0.11%) ⬆️
src/init.jl 100.00% <100.00%> (ø)
src/layouts.jl 67.70% <100.00%> (-0.61%) ⬇️
src/pipeline.jl 89.63% <100.00%> (+0.51%) ⬆️
src/plot.jl 67.71% <100.00%> (+0.51%) ⬆️
src/axes.jl 83.56% <0.00%> (-0.47%) ⬇️
src/examples.jl 61.76% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9f7c6b...909ad33. Read the comment docs.

@t-bltg t-bltg requested review from BeastyBlacksmith and daschw July 5, 2021 21:11
@t-bltg t-bltg changed the title Fix JuliaPlots/Plots.jl/issues/3451 Don't propagate widening axis limits on recipes Jul 5, 2021
@t-bltg t-bltg changed the title Don't propagate widening axis limits on recipes Don't propagate widening axis limits for pipeline recipes Jul 5, 2021
@t-bltg t-bltg marked this pull request as ready for review July 5, 2021 21:20
@t-bltg t-bltg merged commit 6f44004 into JuliaPlots:master Jul 6, 2021
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.

[BUG] log scale plot followed by plot! of function is broken
2 participants