2016-05-30 7 views
-1

私はtikzpictureに問題があります。私はラテックスで私のCVを作ったが、一つはうまく動作していない。スキルグラフには複数のエントリーがあります。ここにコードがあります。 ラテックスTikzpictures複数のエントリー

Multiple entries

Example

\documentclass[]{article} 
\usepackage{tikz} 
\usepackage{pgfplots} 

\begin{document} 
\begin{center} 

\begin{tikzpicture}[thick,scale=0.8, every node/.style={scale=0.8},every node/.style={font=\sffamily}] 
\begin{axis}[title = \textbf{Sprachen}, 
xbar, 
y axis line style = { opacity = 0 }, 
axis x line  = none, 
tickwidth   = 0pt, 
%enlarge y limits={abs=1cm}, 
enlarge x limits = 0.02, 
symbolic y coords = { Französisch, Englisch, Deutsch}, 
%nodes near coords, 
xmin=0, 
xmax=1, 
] 
\addplot coordinates { 
    (1,Deutsch) 
    (0.65,Englisch) 
    (0.3,Französisch) 
}; 

%\legend{Topics} 
\end{axis} 
\node[text width=3cm] at (1.5,-0.5) 
{Grundkennt.}; 
\node[text width=3cm] at (5.25,-0.5) 
{gut}; 
\node[text width=3cm] at (7.4,-0.5) 
{sehr gut}; 
\draw (2.5,0.1) -- (2.5, 5.5); 
\draw (5,0.1) -- (5, 5.5); 
\end{tikzpicture} 
\end{center} 
\end{document} 

私はあなたのいずれかが私を助けることができる願っています。

Greetz道

+0

これは、LaTeXに関する質問のために、専用のスタック交換サイトで尋ねるべきです:http://tex.stackexchange.com – Adriaan

+0

それでは、明日それを行います。どうもありがとうございました。 – Michael

答えて

1

enlarge y limits={abs=1cm}, 

のコメントを解除し、それが動作するはずです、またはあなたが異なる距離を持つようにしたいですか?そして、このコードを試してみてください。

\documentclass[]{article} 
\usepackage{tikz} 
\usepackage{pgfplots} 

\begin{document} 
    \begin{tikzpicture}[thick,every node/.style={font=\sffamily}] 
\begin{axis}[ title=\textbf{Sprachen}, 
xbar, 
width=12cm, height=3.5cm, enlarge y limits=0.5, 
y axis line style = { opacity = 0 }, 
axis x line  = none, 
tickwidth   = 0pt, 
%xlabel={\#participants}, 
symbolic y coords={Französisch, Englisch, Deutsch}, 
ytick=data, 
%nodes near coords, 
nodes near coords align={horizontal}, ] 
\addplot coordinates {(1,Deutsch) (0.65,Englisch) (0.3,Französisch)}; 
\end{axis} 
    \node[text width=3cm] at (1.5,-0.5) 
    {Grundkennt.}; 
    \node[text width=3cm] at (5.25,-0.5) 
    {gut}; 
    \node[text width=3cm] at (7.4,-0.5) 
    {sehr gut}; 
    \draw (2.5,0.1) -- (2.5, 1.95); 
    \draw (5,0.1) -- (5, 1.95); 

    \end{tikzpicture} 
\end{document} 

私はそれを再コーディングし、テンプレートとしてthis pageからの例を使用する必要がありました。私はまだこの繰り返しの言語ラベルの原因を知りません。しかし、この解決法はそれを解決し、距離を縮めなければならない。

ちなみに、LaTeXでCVのテンプレートを探している人は、Overleaf(私はmoderncvが好きです)を見てください。

+0

あなたはうまくいきますが、まだ少し問題があります。距離は私の意見では重いです。私はそれを見てみましょう写真の例を追加します。最初の図は他の図と同じです。事前にどうもありがとうございました! – Michael

+0

yの範囲で絶対値をとらないとどうなりますか?ランチブレイクで遊んでみる – 5th

+0

私はそれを試しましたが、エントリーは2回現れます。これは奇妙な動作です。この問題であなたの時間を過ごすことを前もってありがとう。 – Michael

関連する問題