gnuplot、splot を使用して「軸が等しい」pgfplot を取得する方法 (暗黙の関数)

gnuplot、splot を使用して「軸が等しい」pgfplot を取得する方法 (暗黙の関数)

卵を 1 個手に入れますf(x,y)=x²+y²-4=0。円が必要です。

何をすればいいのでしょうか?

私はテストしました

set size square;
set view equal xy;

(そして私がここで見つけた他のすべてはここ

成功せずに。

ここに画像の説明を入力してください

% arara: pdflatex: {shell: yes}
\documentclass[margin=5mm, tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}

\pgfmathsetmacro\xA{1}
\begin{tikzpicture}
\begin{axis}
\addplot +[
%x=1cm, y=1cm, 
axis equal, 
axis equal image,
    unit vector ratio*=1 1 1,
no markers,
raw gnuplot,
thick,
%empty line = jump % not strictly necessary,
] gnuplot {
f(x,y)= x**2 +y**2-4;
set cntrparam levels discrete 0,0;
set isosample 100,100;
set size square;
set view equal xy;
set cont base;
unset surface;
splot f(x,y);
};
\end{axis}
\end{tikzpicture}

\end{document}

答え1

基本的に、正しいオプションがありますが、場所が間違っています。 はaxis equal、たとえば や のようにwidth、個々のプロットではなく環境heightに属するオプションですaxis。(考えてみてください。 があるプロットが 1 つしかないのに、同じ軸に 2 つのプロットがあるのは意味がありませんaxis equal。)

だから必要なのは

\begin{axis}[equal]

ない

\addplot +[axis equal,...]

関連情報