PGFplots 库 SmithChart 和 Colorbrewer 不兼容吗?

PGFplots 库 SmithChart 和 Colorbrewer 不兼容吗?

我想要的是:在 Smith 图中使用 Colorbrewer

我拥有的:我可以使用红色、绿色和蓝色等常规颜色,但指定的配色方案似乎不起作用。

我尝试过的:我之前使用过 colorbrewer 库,因此我有一些带有矩形图的工作图片,但对于史密斯图来说它似乎不起作用,或者我的代码中可能仍然存在错误。

MWE:

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12} 
\usepgfplotslibrary{smithchart}
\usepgfplotslibrary{colorbrewer}
\pgfplotsset{cycle list/Set1}

\begin{document}
\begin{tikzpicture}[cycle list name=Set1,]
\begin{smithchart}[
%   cycle multi list={Set1-4}, % different (kinda desperate) approaches
    colormap name={Set1},
%   cycle list name=Set1, % my regular setting
]   
\draw[] (0,1) --(1,0);
\end{smithchart}
\end{tikzpicture}
\end{document}

在此处输入图片描述

编辑:解决了:

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usepgfplotslibrary{smithchart}
\usepgfplotslibrary{colorbrewer}
\pgfplotsset{cycle list/Set1-4}
%% data of file.txt
%freq   S(1,1)
%5.00000000000000000E5  -9.92135364814345170E-1    1.25169556541143370E-1 
%6.66760716082158390E5  -9.86057152455524030E-1    1.66407007338343950E-1
%8.89139705020784810E5  -9.75339522033835850E-1    2.20709802135765590E-1 
%1.18568685283347500E6  -9.56563611495252180E-1    2.91523681993693450E-1
%1.58113883008889690E6  -9.24041871507889740E-1    3.82291275992791050E-1 
%2.10848251715075730E6  -8.68803182091356160E-1    4.95157581773654790E-1
%2.81170662596430130E6  -7.78027937536712070E-1    6.28229678073529390E-1
%3.74947104668181290E6  -6.36656581449933690E-1    7.71147454963370830E-1
%5.00000000000000000E6  -4.33913600649795580E-1    9.00954486736777050E-1
\begin{document}
    \begin{tikzpicture}
    \begin{smithchart}[
    ]
    \addplot+[
    is smithchart cs,
    index of colormap=4 of Set1-4, 
    ] table[
    skip first n=1, 
    meta index=0, 
    x expr={\thisrowno{1}}, 
    y expr={\thisrowno{2}}
    ] {file.txt};
    \end{smithchart}
    \end{tikzpicture}
\end{document}

相关内容