Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Color histogram bars#216

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dstansby merged 15 commits intomatplotlib:mainfromjo-mueller:color-histogram-bars
Nov 2, 2023

Conversation

jo-mueller
Copy link
Contributor

@jo-muellerjo-mueller commentedOct 4, 2023
edited
Loading

@dstansby

Fixes#58

This PR expands the feature histogram widget to color the histogram bars according to the color values in the displayed layer. Currently supported:

  • Points layer
  • Vectors layer

I'm not sure how tracks/shapes layer handle features and color, but this can be added relatively easilyhere.

Tests

  • Pytest: I rewrote the existing tests a bit to make them more specific to vectors/points/other future supported layer and updated the respective baseline images. However, I didn't get the tests to pass with the call topytest --mpl - it's probably the same issue as inthis PR.
  • Interactive test: I checked in the viewer that all controls behave as expected.

@jo-mueller
Copy link
ContributorAuthor

pre-commit.ci autofix

pre-commit-ci[bot] reacted with rocket emoji

@dstansby
Copy link
Member

I've just fixed some failing tests (due to a new Matplotlib release) at#217, so worth merging or rebasing main.

@jo-mueller
Copy link
ContributorAuthor

jo-mueller commentedOct 8, 2023
edited
Loading

@dstansby

Strange. The figures in thebaseline folders were saved from the tests themselves using

deepcopy(fig).savefig('./baseline/name_of_test_function.png')

but this generates an incorrect figures size, as it seems. Is there a correct way to save the generated test figures?

As for the other failing tests, I merged the current head into this branch but am not sure why tests are failing.

@jo-mueller
Copy link
ContributorAuthor

Hi@dstansby ,

could you give me a hint on how to properly create the figures needed for the test to make the checks pass? Would be much appreciated :)

@dstansby
Copy link
Member

Ithink the test figures were in the right place, but just needed updating due to changes that happened between opening the PR and now. I've merged in main, and updated the figures, so lets see if the tests pass now 😄

Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

Looking good, thanks for the PR 👍

jo-mueller reacted with hooray emoji
@dstansbydstansby merged commit113e307 intomatplotlib:mainNov 2, 2023
@jo-muellerjo-mueller deleted the color-histogram-bars branchNovember 2, 2023 16:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Make a feature histogram exploration widget
2 participants
@jo-mueller@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp