-
Notifications
You must be signed in to change notification settings - Fork 616
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
New Visual: Bar #2394
Open
Bliss3d
wants to merge
9
commits into
vispy:main
Choose a base branch
from
Bliss3d:bar_chart
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
New Visual: Bar #2394
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
324d4ba
New Visual: Bar
Bliss3d 847963e
flake8 corrected
Bliss3d 59a2791
Added: Docstring, Lincense and Copyright
Bliss3d e4a4aab
Underline same number as characters
Bliss3d 62b32aa
Added: Vertical bar ploting
Bliss3d 8c5de6d
Apply and added suggested changes
Bliss3d 7a21064
flake8, requested changes and swaped h and v
Bliss3d f6c3fa6
Consolidated color and color_array parameters
Bliss3d a4ca071
changes to color logic
Bliss3d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! To get rid of this if clause (and get extra perks like string inputs and aplha values) I would use the
ColorArray
just like you did in theCandle
PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Bliss3d you think you can get this to work with a single
color
argument? I think it would be more intuitive, kinda likeMarkers
does in these few lines:vispy/vispy/visuals/markers.py
Lines 607 to 613 in f13d7da
As you can see, you can use the
ColorArray
object fromvispy.color
, which automatically takes care of all the weird cases (a string like'w'
, a(n, 3)
rgb array, or anrgba
, and so on). You can then simply check if it's a single color, and if so pass it tocolor
, otherwise pass it toface_colors
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing something like this