Skip to content

GR: Fix zscale support in surface plots #5063

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

Merged

Conversation

JakubVanek
Copy link

Description

Previously, zscale was being set to a Bool value (the result of the set membership check). This caused a crash when querying the gr_z_log_scales tuple on the next line, because that array is indexed by symbols like :log10.

Given that the lines above assign the actual symbols to xscale and yscale, it seems likely that zscale should behave the same.

Fixes: #5062

Attribution

Things to consider

  • Does it work on log scales?
  • Does it work in layouts?
  • Does it work in recipes?
  • Does it work with multiple series in one call?
  • PR includes or updates tests?
  • PR includes or updates documentation?

Previously, `zscale` was being set to a Bool value (the result of the
set membership check). This caused a crash when querying the
`gr_z_log_scales` tuple on the next line, because that array is indexed
by symbols like :log10.

Given that the lines above assign the actual symbols to `xscale` and
`yscale`, it seems likely that `zscale` should behave the same.

Fixes: JuliaPlots#5062
@JakubVanek JakubVanek marked this pull request as ready for review March 19, 2025 12:50
@JakubVanek
Copy link
Author

The MWE from the linked issue now seems to be working.

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.42%. Comparing base (fa65e7d) to head (3123f16).
Report is 38 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5063      +/-   ##
==========================================
- Coverage   89.77%   89.42%   -0.35%     
==========================================
  Files          40       40              
  Lines        8780     8453     -327     
==========================================
- Hits         7882     7559     -323     
+ Misses        898      894       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BeastyBlacksmith
Copy link
Member

Nice catch! Thank you

@BeastyBlacksmith BeastyBlacksmith merged commit 31125f2 into JuliaPlots:master Mar 19, 2025
13 of 19 checks passed
@BeastyBlacksmith BeastyBlacksmith linked an issue Mar 19, 2025 that may be closed by this pull request
@JakubVanek JakubVanek deleted the bugfix/5062-zscale-crash branch March 19, 2025 21:18
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] zscale is not working for surface plots
2 participants