3D 그래프가 컴파일되지 않는 이유는 무엇입니까?

3D 그래프가 컴파일되지 않는 이유는 무엇입니까?

저는 LaTeX를 처음 접하고 180개의 포인트가 있는 3D 그래프를 만들려고 합니다. 컴파일을 시도했지만 25분이 지나도 여전히 컴파일되지 않았습니다. 내 컴퓨터가 꽤 열심히 작동하는 것처럼 들리긴 했지만요.

테스트용 3D 그래프를 6개 포인트만으로 생성할 수 있었기 때문에 코드에 문제가 있는 것은 아닌 것 같습니다.

오류 메시지나 경고도 없습니다.

그래프에 넣을 수 있는 점 수에 제한이 있습니까? 아니면 3D 그래프가 컴파일될 때까지 매우 오랜 시간을 기다리고 있습니까?

\usepackage{pgfplots}


\begin{tikzpicture}
    \begin{axis}[xlabel style={align=right,text width=3cm}, 

    xlabel= Query Length (150-5000), 

    ylabel=Document Length (0-100), 

    zlabel=Time Taken (highest:16.22)]

        \addplot3[surf] coordinates {


%HSK 1 document length from 0-3000
%Returning 10 documents
(150, 100, 9.15)(150, 200, 9.91)(150, 300, 10.50)

(150, 400, 10.44) (150,500,10.53)  (150, 600, 9.37)

(150, 700, 15.04 ) (150, 800, 16.16) (150,900,18.00) 

( 150, 1000, 29.34 )(150, 1100, 28.12) (150,1200, 23.31)

(150, 1300, 22.62 )(150, 1400, 24.51 ) (150, 1500, 24.43 ) 

(150, 1600, 28.10 )( 150, 1700, 28.45 ) (150, 1800, 16.46 ) 

(150, 1900, 29.19 )(150,2000, 28.55 ) (150, 2100, 31.86 )

(150, 2200,33.02 ) (150, 2300, 33.69 ) (150, 2400, 33.40 )

(150, 2500, 33.00 ) (150, 2600, 33.65) (150, 2700, 32.51 )

(150, 2800,36.29 ) (150, 2900, 38.33 ) (150, 3000, 41.47 )





%HSK 2 document length from 0-3000
%Returning 10 documents

(300, 100,11.29 )(300, 200, 10.81 )(300, 300, 9.96 )

(300, 400, 12.02) (300,500, 14.03)  (300, 600, 15.24)

(300, 700, 18.22 ) (300, 800, 18.98 ) (300, 900, 18.56) 

( 300, 1000, 20.44) ( 300, 1100, 22.40 ) (300,1200, )

(300, 1300, 22.47 )(300, 1400, 24.95 ) (300, 1500,  25.43) 

(300, 1600, 26.87)( 300, 1700, 28.77 ) (300, 1800, 29.75 ) 

(300, 1900, 30.46 )(300,2000, 32.41 ) (300, 2100, 32.94 )

(300, 2200, 34.15 ) (300, 2300, 35.48 ) (300, 2400, 36.42)

(300, 2500, 36.05 ) (300, 2600, 36.00) (300, 2700, 37.59 )

(300, 2800, 38.57) (300, 2900, 39.11 ) (300, 3000, 40.77)





%HSK 3 document length from 0-3000
%Returning 10 documents

(600, 100, 11.47 )(600, 200, 10.89 )(600, 300, 10.96)

(600, 400, 13.98 ) (600,500, 15.66)  (600, 600, 16.09 )

(600, 700, 17.49 ) (600, 800, 19.65 ) (600, 900, 19.80 ) 

( 600, 1000, 21.04 ) ( 600, 1100, 22.85) (600,1200, 23.60 )

(600, 1300, 25.86  )(600, 1400, 26.58 ) (600, 1500,  27.73 ) 

(600, 1600, 30.21 )( 600, 1700, 30.14 ) (600, 1800, 30.99 ) 

(600, 1900, 31.77 )(600,2000, 32.21 ) (600, 2100, 33.89 )

(600, 2200, 34.95 ) (600, 2300, 35.59 ) (600, 2400, 35.76 )

(600, 2500, 36.87) (600, 2600, 37.14) (600, 2700, 38.42 )

(600, 2800, 38.01 ) (600, 2900, 42.47) (600, 3000, 41.63 )



%HSK 4 document length from 0-3000
%Returning 10 documents

(1200, 100, 11.82)(1200, 200, 12.02)(1200, 300,12.46 )

(1200, 400, 15.27) (1200,500, 16.91 )  (1200, 600, 16.80 )

(1200, 700, 18.65 ) (1200, 800, 19.86) (1200,900, 19.03) 

( 1200, 1000, 21.96 )(1200, 1100, 23.43 ) (1200,1200, 23.25 )

(1200, 1300, 23.83 )(1200, 1400,  26.29 ) (1200, 1500, 28.24) 

(1200, 1600, 29.88)( 1200, 1700, 30.34) (1200, 1800,31.60 )

(1200, 1900, 32.23)(1200,2000, 33.40 ) (1200, 2100, 34.00)

(1200, 2200, 34.52) (1200, 2300, 34.91) (1200, 2400,)

(1200, 2500, 35.70) (1200, 2600, 35.50) (1200, 2700, 35.24 )

(1200, 2800, 34.23) (1200, 2900, 35.41) (1200, 3000, 36.47)


%HSK 5 document length from 0-3000
%Returning 10 documents


(2500, 100,  13.97)(2500, 200, 11.00 )(2500, 300, 11.47 )

(2500, 400, 11.81 ) (2500,500, 11.46)  (2500, 600, 13.36 )

(2500, 700, 16.62 ) (2500, 800, 19.07) (2500, 900, 19.05)

( 2500, 1000, 22.25 ) ( 2500, 1100,  25.32) (2500,1200, 25.08)

(2500, 1300, 25.37 )(2500, 1400, 25.43) (2500, 1500, 29.30 ) 

(2500, 1600,27.89 )( 2500, 1700, 31.77 ) (2500, 1800, 31.86 ) 

(2500, 1900, 32.66 )(2500,2000, 34.85) (2500, 2100,36.96 )

(2500, 2200, 34.44 ) (2500, 2300, 36.54 ) (2500, 2400, 32.60)

(2500, 2500, 37.17 ) (2500, 2600, 38.71) (2500, 2700, 38.28)

(2500, 2800, 39.89 ) (2500, 2900, 42,10 ) (2500, 3000, 41.07)


%HSK 6 document length from 0-3000
%Returning 10 documents


(5000, 100, 14.28 )(5000, 200, 14.56 )(5000, 300, 13.62 )

(5000, 400, 14.74 ) (5000,500, 13.44)  (5000, 600, 14.83 )

(5000, 700, 20.38 ) (5000, 800, 20.11 ) (5000, 900, 24.16 )

( 5000, 1000, 19.48 ) ( 5000, 1100, 29.05 ) (5000,1200, 32.22 )

(5000, 1300, 21.83 )(5000, 1400,27.03 ) (5000, 1500, 28.55  ) 

(5000, 1600, 27.07 )( 5000, 1700,29.80 ) (5000, 1800, 35.65 )

(5000, 1900, 32.88)(5000,2000, 37.07 ) (5000, 2100, 37.88 )

(5000, 2200, 37.00 ) (5000, 2300, ) (5000, 2400, 40.86 )

(5000, 2500, 40.65 ) (5000, 2600, 41.50) (5000, 2700, 39.78)

(5000, 2800, 38.84 ) (5000, 2900, 43.30 ) (5000, 3000, 42.73 )


};
    \end{axis}
\end{tikzpicture}

답변1

이것이 정확히 컴파일하고 있는 코드라면 유효한 TeX 문서가 아닙니다. 코드의 일부인 경우 전체 내용을 게시해 주세요. 이 예에서는 빈 줄을 제거해야 합니다. 그 중 일부는 필요하지 않으며 일부는 오류로 이어집니다. 직접 시도해 보세요

하지만 가장 큰 문제는 누락된 데이터 포인트가 있다는 것입니다. 제가 볼 수 있는 한 3개는 (300,1200, )(1200,2400,)입니다 (5000,2300,). 이러한 항목을 채우거나 적절하게 제거하면 제대로 작동합니다.

문제가 있는 항목을 무작위로 수정하면 다음과 같은 결과가 나타납니다.

\documentclass{article}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
    \begin{axis}[xlabel style={align=right,text width=3cm}, 
    xlabel= Query Length (150-5000), 
    ylabel=Document Length (0-100), 
    zlabel=Time Taken (highest:16.22)]

        \addplot3[surf] coordinates {
%HSK 1 document length from 0-3000
%Returning 10 documents
(150, 100, 9.15)(150, 200, 9.91)(150, 300, 10.50)
(150, 400, 10.44) (150,500,10.53)  (150, 600, 9.37)
(150, 700, 15.04) (150, 800, 16.16) (150,900,18.00) 
( 150, 1000, 29.34 )(150, 1100, 28.12) (150,1200, 23.31)
(150, 1300, 22.62 )(150, 1400, 24.51 ) (150, 1500, 24.43 ) 
(150, 1600, 28.10 )( 150, 1700, 28.45 ) (150, 1800, 16.46 ) 
(150, 1900, 29.19 )(150,2000, 28.55 ) (150, 2100, 31.86 )
(150, 2200,33.02 ) (150, 2300, 33.69 ) (150, 2400, 33.40 )
(150, 2500, 33.00 ) (150, 2600, 33.65) (150, 2700, 32.51 )
(150, 2800,36.29 ) (150, 2900, 38.33 ) (150, 3000, 41.47 )

%HSK 2 document length from 0-3000
%Returning 10 documents
(300, 100,11.29 )(300, 200, 10.81 )(300, 300, 9.96 )
(300, 400, 12.02) (300,500, 14.03)  (300, 600, 15.24)
(300, 700, 18.22 ) (300, 800, 18.98 ) (300, 900, 18.56) 
( 300, 1000, 20.44) ( 300, 1100, 22.40 ) (300,1200, 24.00)
(300, 1300, 22.47 )(300, 1400, 24.95 ) (300, 1500,  25.43) 
(300, 1600, 26.87)( 300, 1700, 28.77 ) (300, 1800, 29.75 ) 
(300, 1900, 30.46 )(300,2000, 32.41 ) (300, 2100, 32.94 )
(300, 2200, 34.15 ) (300, 2300, 35.48 ) (300, 2400, 36.42)
(300, 2500, 36.05 ) (300, 2600, 36.00) (300, 2700, 37.59 )
(300, 2800, 38.57) (300, 2900, 39.11 ) (300, 3000, 40.77)

%HSK 3 document length from 0-3000
%Returning 10 documents
(600, 100, 11.47 )(600, 200, 10.89 )(600, 300, 10.96)
(600, 400, 13.98 ) (600,500, 15.66)  (600, 600, 16.09 )
(600, 700, 17.49 ) (600, 800, 19.65 ) (600, 900, 19.80 ) 
( 600, 1000, 21.04 ) ( 600, 1100, 22.85) (600,1200, 23.60 )
(600, 1300, 25.86  )(600, 1400, 26.58 ) (600, 1500,  27.73 ) 
(600, 1600, 30.21 )( 600, 1700, 30.14 ) (600, 1800, 30.99 ) 
(600, 1900, 31.77 )(600,2000, 32.21 ) (600, 2100, 33.89 )
(600, 2200, 34.95 ) (600, 2300, 35.59 ) (600, 2400, 35.76 )
(600, 2500, 36.87) (600, 2600, 37.14) (600, 2700, 38.42 )
(600, 2800, 38.01 ) (600, 2900, 42.47) (600, 3000, 41.63 )

%HSK 4 document length from 0-3000
%Returning 10 documents
(1200, 100, 11.82)(1200, 200, 12.02)(1200, 300,12.46 )
(1200, 400, 15.27) (1200,500, 16.91 )  (1200, 600, 16.80 )
(1200, 700, 18.65 ) (1200, 800, 19.86) (1200,900, 19.03) 
(1200, 1000, 21.96 )(1200, 1100, 23.43 ) (1200,1200, 23.25 )
(1200, 1300, 23.83 )(1200, 1400,  26.29 ) (1200, 1500, 28.24) 
(1200, 1600, 29.88)( 1200, 1700, 30.34) (1200, 1800,31.60 )
(1200, 1900, 32.23)(1200,2000, 33.40 ) (1200, 2100, 34.00)
(1200, 2200, 34.52) (1200, 2300, 34.91) (1200, 2400,35)
(1200, 2500, 35.70) (1200, 2600, 35.50) (1200, 2700, 35.24 )
(1200, 2800, 34.23) (1200, 2900, 35.41) (1200, 3000, 36.47)

%HSK 5 document length from 0-3000
%Returning 10 documents
(2500, 100,  13.97)(2500, 200, 11.00 )(2500, 300, 11.47 )
(2500, 400, 11.81 ) (2500,500, 11.46)  (2500, 600, 13.36 )
(2500, 700, 16.62 ) (2500, 800, 19.07) (2500, 900, 19.05)
(2500, 1000, 22.25 ) ( 2500, 1100,  25.32) (2500,1200, 25.08)
(2500, 1300, 25.37 )(2500, 1400, 25.43) (2500, 1500, 29.30 ) 
(2500, 1600,27.89 )( 2500, 1700, 31.77 ) (2500, 1800, 31.86 ) 
(2500, 1900, 32.66 )(2500,2000, 34.85) (2500, 2100,36.96 )
(2500, 2200, 34.44 ) (2500, 2300, 36.54 ) (2500, 2400, 32.60)
(2500, 2500, 37.17 ) (2500, 2600, 38.71) (2500, 2700, 38.28)
(2500, 2800, 39.89 ) (2500, 2900, 42.10 ) (2500, 3000, 41.07)

%%HSK 6 document length from 0-3000
%%Returning 10 documents
(5000, 100, 14.28 )(5000, 200, 14.56 )(5000, 300, 13.62 )
(5000, 400, 14.74 ) (5000,500, 13.44)  (5000, 600, 14.83 )
(5000, 700, 20.38 ) (5000, 800, 20.11 ) (5000, 900, 24.16 )
( 5000, 1000, 19.48 ) ( 5000, 1100, 29.05 ) (5000,1200, 32.22 )
(5000, 1300, 21.83 )(5000, 1400,27.03 ) (5000, 1500, 28.55  ) 
(5000, 1600, 27.07 )( 5000, 1700,29.80 ) (5000, 1800, 35.65 )
(5000, 1900, 32.88)(5000,2000, 37.07 ) (5000, 2100, 37.88 )
(5000, 2200, 37.00 ) (5000, 2300,39 ) (5000, 2400, 40.86 )
(5000, 2500, 40.65 ) (5000, 2600, 41.50) (5000, 2700, 39.78)
(5000, 2800, 38.84 ) (5000, 2900, 43.30 ) (5000, 3000, 42.73 )
};
\end{axis}
\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보