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

Add files via upload#30156

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

Closed
A-n-sh wants to merge1 commit intomatplotlib:mainfromA-n-sh:main
Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletionsrepro.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
# Standalone script demonstrating three things:
# - Generates random 2D array (arr) and turns it into RGB via skimage.color.gray2rgb
# - Makes full-size 2D alpha array with, say, the top half at 0.2 transparency and the bottom half at 1.0

Check failure on line 3 in repro.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶Line too long (105 > 88)Raw Output:message:"Line too long (105 > 88)" location:{path:"/home/runner/work/matplotlib/matplotlib/repro.py" range:{start:{line:3 column:89} end:{line:3 column:106}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E501" url:"https://docs.astral.sh/ruff/rules/line-too-long"}
# - On left, calls imshow(arr, alpha=alpha, cmap='gray')

Check failure on line 4 in repro.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶Trailing whitespaceRaw Output:message:"Trailing whitespace" location:{path:"/home/runner/work/matplotlib/matplotlib/repro.py" range:{start:{line:4 column:57} end:{line:4 column:58}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"W291" url:"https://docs.astral.sh/ruff/rules/trailing-whitespace"}
# - On right, calls imshow(arr_rgb, alpha=alpha)

Check failure on line 5 in repro.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶Trailing whitespaceRaw Output:message:"Trailing whitespace" location:{path:"/home/runner/work/matplotlib/matplotlib/repro.py" range:{start:{line:5 column:49} end:{line:5 column:50}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"W291" url:"https://docs.astral.sh/ruff/rules/trailing-whitespace"}

import numpy as np
import matplotlib.pyplot as plt
from skimage.color import gray2rgb

arr = np.random.random((10, 10))
arr_rgb = gray2rgb(arr)
alpha = np.ones_like(arr)
alpha[:5] 0.2

Check failure on line 14 in repro.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶SyntaxError: Simple statements must be separated by newlines or semicolonsRaw Output:message:"SyntaxError: Simple statements must be separated by newlines or semicolons" location:{path:"/home/runner/work/matplotlib/matplotlib/repro.py" range:{start:{line:14 column:11} end:{line:14 column:12}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{}

fig, (ax1, ax2) = plt.subplots(1, 2)
ax1.set_title("Expected"); axl.imshow(arr, alpha=alpha, cmp='gray')

Check failure on line 17 in repro.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶Multiple statements on one line (semicolon)Raw Output:message:"Multiple statements on one line (semicolon)" location:{path:"/home/runner/work/matplotlib/matplotlib/repro.py" range:{start:{line:17 column:26} end:{line:17 column:27}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E702" url:"https://docs.astral.sh/ruff/rules/multiple-statements-on-one-line-semicolon"}
ax2.set_title("Broken"); ax2.imshow(arr_rgb, alpha=alpha)

Check failure on line 18 in repro.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶Multiple statements on one line (semicolon)Raw Output:message:"Multiple statements on one line (semicolon)" location:{path:"/home/runner/work/matplotlib/matplotlib/repro.py" range:{start:{line:18 column:24} end:{line:18 column:25}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E702" url:"https://docs.astral.sh/ruff/rules/multiple-statements-on-one-line-semicolon"}
plt.show()

Check failure on line 19 in repro.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶No newline at end of fileRaw Output:message:"No newline at end of file" location:{path:"/home/runner/work/matplotlib/matplotlib/repro.py" range:{start:{line:19 column:11} end:{line:19 column:11}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"W292" url:"https://docs.astral.sh/ruff/rules/missing-newline-at-end-of-file"}
Loading

[8]ページ先頭

©2009-2025 Movatter.jp