vgsvg enhancement: avoid transform instructions in svg code
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- go
調査の方向性
まず、グループとテキストの transform 属性を生成する SVG 生成コードを特定し、SVG 出力前にプロット座標がどのように変換されるかを追跡します。transform が繰り返される場合とされない場合で生成された SVG を比較し、該当するレンダリングテストがあれば特定します。冗長な transform 命令を削除したうえで同等のプロットが生成され、SVG 出力が小さくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Suggestion
To make generated svg code more compact, I suggest to make the transform in the Go code instead of the svg code.
The change would allow to change
<g transform="scale(1, -1) translate(0, -216)">into<g>which occur once in the svg code.<text x="462.81" y="-0.2002" transform="scale(1, -1)" style=...into<text x="462.81" y="-0.2002" style=...which occur for every text tag in the svg code.
Benefits :
- reduce the size of the SVG code for plots,
- execute the transform once at svg code generation, not at each plot rendering.
Disadvantages :
- make the go code a little more complex by adding the transform instruction
Another optimization could be to use style definition in the svg code to avoid repeating the style in each text tag. This would be more beneficial to the size, but also slightly more complex to implement.
If you agree, I may work on a PR proposal.
The use case I have is that I attach multiple svg plots to mails which has a maximum size limit. Whoever would want to save/archive many plots would be glad that they are small. They are already smaller than PNG plots, but we could do better than that.
- 主要言語
- Go
- スター
- 3k
- フォーク
- 202
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
gonum/plot のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 32/100
-
plot/plotter: NewHist(binPoints) panic when a small negative number is used対応中かも @SashaMIT が 18 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
似ている issue
-
feat(gmail): make gmail get --format raw text output the exact message, like drafts get --format rawオープンclawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openclaw/gogcli#1276 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
hiero-ledger/hiero-sdk-go#1886 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
cloudevents/sdk-go#1346 ·