Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计通过

pgfplotspgfplots 命令行

Agent Skill

pgfplots 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

727

周安装

30

GitHub Stars

4

下载量

238
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pgfplots(pgfplots 命令行)
来源仓库:https://github.com/igbuend/grimbard
仓库路径:skills/pgfplots
安装命令:
npx skills add https://github.com/igbuend/grimbard --skill pgfplots
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/igbuend/grimbard --skill pgfplots

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合围绕仓库状态、代码变更或协作事项进行整理。pgfplots 属于待分类类 Skill,可作为该场景下的辅助能力补充。
  • 可结合来源仓库和 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态,避免越权操作。
  • 注意是否会触发联网、命令执行或文件读写,谨慎授权。

SKILL.md

pgfplots — Data Visualization & Plotting

CTAN: https://ctan.org/pkg/pgfplots Manual: texdoc pgfplots

Setup

\usepackage{pgfplots}
\pgfplotsset{compat=1.18}  % ALWAYS set this — enables latest features

% Optional libraries
\usepgfplotslibrary{fillbetween, groupplots, statistics, colorbrewer, polar}

Basic Plot

\begin{tikzpicture}
\begin{axis}[
  xlabel={$x$},
  ylabel={$f(x)$},
  title={My Plot},
  grid=major,
]
  \addplot[blue, thick, domain=-3:3, samples=100] {x^2};
  \addlegend{$x^2$}
\end{axis}
\end{tikzpicture}

Axis Environments

EnvironmentDescription
axisStandard linear axes
semilogxaxisLog scale on x-axis
semilogyaxisLog scale on y-axis
loglogaxisLog scale on both axes
polaraxisPolar coordinates (requires polar library)

Axis Options Reference

OptionExampleDescription
xlabelxlabel={Time (s)}X-axis label
ylabelylabel={Voltage}Y-axis label
titletitle={Results}Plot title
xmin/xmaxxmin=0, xmax=10Axis limits
ymin/ymaxymin=-1, ymax=1Axis limits
domaindomain=0:2*piDefault plot domain
samplessamples=200Default sample count
gridgrid=majormajor, minor, both, none
legend poslegend pos=north westLegend placement
width/heightwidth=10cmAxis dimensions
axis linesaxis lines=middlebox, left, middle, none
enlargelimitsenlargelimits=0.1Pad axis range
xtickxtick={0,1,...,5}Custom tick positions
xticklabelsxticklabels={A,B,C}Custom tick labels
x tick label stylex tick label style={rotate=45}Tick label formatting
legend stylelegend style={at={(0.5,-0.2)}}Legend customization
cycle list namecycle list name=color listColor cycling
scaled ticksscaled ticks=falseDisable tick scaling
restrict y to domainrestrict y to domain=-10:10Clip extreme values

Plot Types & Examples

Line Plot (from expression)

\begin{axis}[domain=0:2*pi, samples=100, grid=major,
  legend pos=south west]
  \addplot[blue, thick] {sin(deg(x))};
  \addplot[red, thick, dashed] {cos(deg(x))};
  \legend{$\sin(x)$, $\cos(x)$}
\end{axis}

Line Plot (from data)

\begin{axis}[xlabel=Year, ylabel=Value]
  \addplot coordinates {
    (2018, 10) (2019, 15) (2020, 12) (2021, 20) (2022, 25)
  };
\end{axis}

Scatter Plot

\begin{axis}[only marks, xlabel=$x$, ylabel=$y$]
  \addplot[mark=*, blue] coordinates {
    (1,2) (2,3.5) (3,2.8) (4,5.1) (5,4.2)
  };
  % Or with mark options:
  \addplot+[mark=o, mark size=3pt, red] coordinates { ... };
\end{axis}

Bar Chart

\begin{axis}[
  ybar,                    % vertical bars (xbar for horizontal)
  symbolic x coords={A, B, C, D},
  xtick=data,
  ylabel={Count},
  nodes near coords,       % value labels on bars
  bar width=15pt,
]
  \addplot coordinates {(A,20) (B,35) (C,30) (D,15)};
  \addplot coordinates {(A,25) (B,20) (C,40) (D,10)};
  \legend{2022, 2023}
\end{axis}

Stacked Bar

\begin{axis}[ybar stacked, symbolic x coords={Q1,Q2,Q3,Q4}, xtick=data]
  \addplot coordinates {(Q1,10) (Q2,15) (Q3,12) (Q4,18)};
  \addplot coordinates {(Q1,8)  (Q2,10) (Q3,15) (Q4,12)};
  \legend{Product A, Product B}
\end{axis}

Histogram

\usepgfplotslibrary{statistics}

\begin{axis}[ybar interval, ylabel=Frequency, xlabel=Value]
  \addplot+[hist={bins=10, data min=0, data max=100}]
    table[y index=0] {data.csv};
\end{axis}

Box Plot

\usepgfplotslibrary{statistics}

\begin{axis}[boxplot/draw direction=y]
  \addplot[boxplot prepared={
    lower whisker=2, lower quartile=4,
    median=6, upper quartile=8, upper whisker=10
  }] coordinates {};
\end{axis}

Area / Fill Between

\usepgfplotslibrary{fillbetween}

\begin{axis}
  \addplot[name path=upper, blue, thick, domain=0:4] {x^2};
  \addplot[name path=lower, red, thick, domain=0:4] {x};
  \addplot[fill=blue!10] fill between[of=upper and lower, soft clip={domain=1:3}];
\end{axis}

Error Bars

\begin{axis}
  \addplot+[error bars/.cd, y dir=both, y explicit]
    coordinates {
      (1, 2) +- (0, 0.5)
      (2, 4) +- (0, 0.8)
      (3, 3) +- (0, 0.3)
    };
\end{axis}

3D Surface

\begin{axis}[view={45}{30}, xlabel=$x$, ylabel=$y$, zlabel=$z$,
  colormap/viridis]
  \addplot3[surf, domain=-2:2, domain y=-2:2, samples=25]
    {exp(-x^2 - y^2)};
\end{axis}

3D Mesh

\begin{axis}[view={60}{30}]
  \addplot3[mesh, domain=-2:2, domain y=-2:2, samples=20]
    {sin(deg(x)) * cos(deg(y))};
\end{axis}

Contour

\begin{axis}[view={0}{90}]  % top-down view
  \addplot3[contour filled, domain=-2:2, domain y=-2:2, samples=30]
    {exp(-x^2 - y^2)};
\end{axis}

Parametric Plot

\begin{axis}[axis equal]
  \addplot[domain=0:360, samples=100, thick, blue]
    ({cos(x)}, {sin(x)});  % circle
\end{axis}

Polar Plot

\usepgfplotslibrary{polar}

\begin{polaraxis}
  \addplot[domain=0:360, samples=100, thick]
    {1 + cos(x)};  % cardioid
\end{polaraxis}

Data from Files

% CSV file: data.csv
% x, y
% 1, 2.3
% 2, 4.1
% ...

\begin{axis}
  \addplot table[col sep=comma, x=x, y=y] {data.csv};

  % TSV (default separator is space/tab)
  \addplot table[x index=0, y index=1] {data.tsv};

  % With expression on column
  \addplot table[x=time, y expr=\thisrow{value}*100] {data.csv};
\end{axis}

Color Maps

% Built-in colormaps
colormap/hot, colormap/cool, colormap/viridis,
colormap/bluered, colormap/greenyellow, colormap/jet

% Custom
\pgfplotsset{
  colormap={mymap}{rgb255(0cm)=(0,0,180); rgb255(1cm)=(0,180,0); rgb255(2cm)=(180,0,0)}
}

% Colorbar
\begin{axis}[colorbar, colormap/viridis]

Multiple Axes

\begin{tikzpicture}
\begin{axis}[
  axis y line*=left, xlabel=Time, ylabel=Temperature,
  ymin=0, ymax=100,
]
  \addplot[blue, thick] coordinates {(1,20)(2,40)(3,60)(4,80)};
  \label{plot:temp}
\end{axis}

\begin{axis}[
  axis y line*=right, axis x line=none,
  ylabel=Pressure, ymin=0, ymax=10,
]
  \addplot[red, thick, dashed] coordinates {(1,2)(2,5)(3,3)(4,8)};
  \label{plot:press}
\end{axis}
\end{tikzpicture}

Group Plots

\usepgfplotslibrary{groupplots}

\begin{tikzpicture}
\begin{groupplot}[
  group style={group size=2 by 2, horizontal sep=1.5cm, vertical sep=1.5cm},
  width=6cm, height=5cm,
]
  \nextgroupplot[title=Plot 1]
    \addplot {x};
  \nextgroupplot[title=Plot 2]
    \addplot {x^2};
  \nextgroupplot[title=Plot 3]
    \addplot {sqrt(x)};
  \nextgroupplot[title=Plot 4]
    \addplot {ln(x)};
\end{groupplot}
\end{tikzpicture}

Annotations

\begin{axis}
  \addplot[blue, thick, domain=0:5] {x^2};

  % Pin annotation
  \node[pin=60:{Maximum}] at (axis cs:4, 16) {};

  % Arrow annotation
  \draw[->, thick] (axis cs:2, 10) -- (axis cs:3, 9)
    node[above, pos=0] {Note};

  % Vertical line
  \draw[dashed, gray] (axis cs:2.5, 0) -- (axis cs:2.5, 25);

  % Horizontal band
  \draw[fill=red!10, draw=none] (axis cs:0,5) rectangle (axis cs:5,10);

  % Text node
  \node at (axis cs:1, 20) {$f(x) = x^2$};
\end{axis}

Mark Options

MarkDescription
*Filled circle
oOpen circle
square*Filled square
squareOpen square
triangle*Filled triangle
diamond*Filled diamond
xCross
+Plus
starStar
noneNo marks
\addplot+[mark=triangle*, mark size=3pt, mark options={fill=red}] ...;

Common Pitfalls

ProblemCauseFix
"Dimension too large"Large values or domainUse restrict y to domain, check domain
Missing compat warningNo \pgfplotsset{compat=..}Add \pgfplotsset{compat=1.18}
Trig functions wrongpgfplots uses degreesUse sin(deg(x)) for radians input
Bars overlappingMultiple bar plots without groupingUse ybar with bar shift or legend
Legend in wrong spotDefault positionSet legend pos=north west etc.
3D plot too slowToo many samplesReduce samples for 3D
Axis labels cut offTight bounding boxUse trim axis left/right or increase margins
Fill between failsPaths not namedAdd name path=A to each plot
CSV column errorWrong separatorSet col sep=comma for CSV files
\addlegendentry orderMust follow its \addplotPut legend entry right after its plot

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.92%
按下载量换算78

Claude

29.49%
按下载量换算70

Cursor

19.75%
按下载量换算47

Gemini CLI

9.82%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills