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

Update plotting recipe to support Plots 1.10.0 #218

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

omus
Copy link
Collaborator

@omus omus commented Jun 14, 2023

Attempts to eliminate the plotting warnings we see during testing:

┌ Warning: Indices Base.OneTo(33) of attribute `markeralpha` does not match data indices 1:32.
└ @ Plots ~/.julia/packages/Plots/rz1WP/src/utils.jl:141
┌ Info: Data contains NaNs or missing values, and indices of `markeralpha` vector do not match data indices.
│ If you intend elements of `markeralpha` to apply to individual NaN-separated segments in the data,
│ pass each segment in a separate vector instead, and use a row vector for `markeralpha`. Legend entries
│ may be suppressed by passing an empty label.
│ For example,
└     plot([1:2,1:3], [[4,5],[3,4,5]], label=["y" ""], markeralpha=[1 2])

This PR is responsible for the above warning.

A quick example that generates the warnings is:

plot([1, 3, NaN, 2, 5, NaN], [1, 1, NaN, 2, 2, NaN], markershape=[:vline, :vline, :none, :vline, :none, :none], markeralpha=[1, 1, 0, 1, 0, 0])

and the equivalent plot without the warnings:

plot([[1, 3], [2, 5]], [[1, 1], [2, 2]], markershape=permutedims([[:vline, :vline], [:vline, :none]]), markeralpha=permutedims([[1, 1], [1, 0]]))

Unfortunately, this approach doesn't work for TimeTypes so I've reported this as an issue against Plots:

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.

None yet

1 participant