その他一覧へ戻る

graph

鉄TeX機能紹介/TikZサンプル/graph.tex鉄TeX機能紹介 / TikZhybrid

レンダリング結果

1ページ / 同名PDFあり
graph preview
PDFを開く
TeXソース
TeXソース
入力コード
\documentclass[b4j,landscape]{tetsujsarticle}
\usepackage{tetsuryoku}
\usepackage{tikz-3dplot}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
  thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]
  \node[main node] (1) {1};
  \node[main node] (2) [below left of=1] {2};
  \node[main node] (3) [below right of=2] {3};
  \node[main node] (4) [below right of=1] {4};
  \path[every node/.style={font=\sffamily\small}]
    (1) edge node [left] {0.6} (4)
        edge [bend right] node[left] {0.3} (2)
        edge [loop above] node {0.1} (1)
    (2) edge node [right] {0.4} (1)
        edge node {0.3} (4)
        edge [loop left] node {0.4} (2)
        edge [bend right] node[left] {0.1} (3)
    (3) edge node [right] {0.8} (2)
        edge [bend right] node[right] {0.2} (4)
    (4) edge node [left] {0.2} (3)
        edge [loop right] node {0.6} (4)
        edge [bend right] node[right] {0.2} (1);
\end{tikzpicture}

\tdplotsetmaincoords{70}{135}
\begin{tikzpicture}[line join=bevel,tdplot_main_coords, fill opacity=.7]
\tdplotsphericalsurfaceplot[parametricfill]{72}{36}%
{5*sin(\tdplottheta)*cos(\tdplottheta)}{black}{\tdplotphi}%
    {\draw[color=black,thick,->] (0,0,0) -- (3,0,0) node[anchor=north east]{$x$};}%
    {\draw[color=black,thick,->] (0,0,0) -- (0,3,0) node[anchor=north west]{$y$};}%
    {\draw[color=black,thick,->] (0,0,0) -- (0,0,3) node[anchor=south]{$z$};}%
\end{tikzpicture}


\end{document}