%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20'%EC%B6%95%20%EB%8F%99%EC%9D%BC'%20pgfplot%EC%9D%84%20%EC%96%BB%EB%8A%94%20%EB%B0%A9%EB%B2%95.png)
나는 계란을 얻습니다 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
(생각해 보세요. 동일한 축에 두 개의 플롯이 있고 하나의 플롯에만 가 있는 것은 의미가 없습니다 axis equal
.)
그래서 당신은 필요합니다
\begin{axis}[equal]
~ 아니다
\addplot +[axis equal,...]