2012-10-27 73 views
1

我使用tikz使用建築像繪製圖表:如何改變顏色和形狀的情節

\draw plot [mark=ball] coordinates {(0,0) (1,1) ...}; 

但是我想能夠改變顏色和球的形狀 - 它看起來像一個藍色的圓圈。我沒有發現(或不明白)如何去做。一個簡單的例子,將不勝感激。

回答

1

你可以嘗試

\draw [color=green, mark=triangle] plot coordinates { (0,0) (1,1) ...}; 

如果我理解你的權利。

顏色可以設置,即紅,綠,藍,黑,......和標誌即圈,O,X,明星,....

+1

不,它不起作用。您的建議使原本黑色的曲線變綠並且沒有標記出現!我希望這個標記是一個不同顏色的球。 - tsf – Tsf

0
\documentclass[tikz,border=5mm]{standalone} 
\pgfdeclareplotmark{ball}{\shade[draw=none,ball color=green] (0,0) circle (\pgfplotmarksize);} 

\begin{document} 
\begin{tikzpicture} 
    \draw plot [mark=ball] coordinates {(0,0) (1,1)}; 
\end{tikzpicture} 
\end{document} 

有點晚了,很遺憾,但我們做到了!

不需要說你需要的技巧是第2行(reference,比你的文章更近)。