Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`annotation_logticks()` warns on R-devel: object length is not a multiple of subscript length

オープン 初心者向け
#6,906 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
r

調査の方向性

まず calc_logticks() を見つけ、ticks と cycleIdx がどのように構築されているかを確認します。cycleIdx に追加される最後の tick を考慮し、その後 R-devel で annotation_logticks() の例を実行して、警告がなくなり、プロット出力が同一であることを確認します。

索引モデルが issue の本文から書いたものです。

説明

On R-devel, any plot with annotation_logticks() warns:

library(ggplot2)
ggplot(data.frame(x = c(1, 1000), y = 1:2), aes(x, y)) +
  geom_point() +
  scale_x_log10() +
  annotation_logticks(sides = "b")
#> Warning: object length is not a multiple of subscript length
#> Warning: object length is not a multiple of subscript length

In calc_logticks(), ticks gets a final tick appended, but cycleIdx is built from ticknums and does not, so tickend[cycleIdx == 0] uses a logical index one element short. R-devel now warns about this ("x[logi] now warns if length(x) is not a multiple of length(logi)"). No warning on R 4.5/4.6.

Covering the last tick fixes it with identical output:

cycleIdx <- c(ticknums, 1) - 1

R Under development (unstable) (2026-09-25 r90590), ggplot2 4.0.3.

主要言語
R
スター
7k
フォーク
2.1k
平均マージ
1日 16時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tidyverse/ggplot2 のほかの issue

tidyverse/ggplot2 の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。