1

I am trying to visualize about 21 data points, each which gives a different value for 3 different tasks, so there are 63 unique values to plot. I have tried using pgfplots colored bar plot, but I think it's not meant for this many values.

What kind of pgfplot object would allow visualizing all these information in a visible but compact way?

This is the snippet I have tried, but it's impossible to see anything. Note that it's meant to be displayed as its own slide for a powerpoint.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{ifsym}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tipa}
\usepackage{textcomp}
\usepackage{tikz}
\usepackage{pgf}
\usepackage{pgfplots}
\pgfplotsset{width=9cm,compat=1.8}
\geometry{a4paper}
\usepackage[francais]{babel}


\begin{document}
\begin{tikzpicture}
\begin{axis}[
    ybar,
    enlargelimits=0.01,
    legend style={at={(0.5,-0.15)},
      anchor=north,legend columns=-1},
    ylabel={Fleiss' Kappa ($\kappa$)},
    symbolic x coords={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21},
    xtick=data,
    nodes near coords,
    every node near coord/.append style={font=\tiny},
    nodes near coords align={vertical},
    ]
\addplot coordinates {(0,0.820634615371) (1,0.749387104566) (2,0.877447627014) (3,0.730605521817) (4,0.721264576953) (5,0.712448104015) (6,0.826797749795) (7,0.799574244172) (8,0.787091644026) (9,0.684913627639) (10,0.789086760885) (11,0.857439617666) (12,0.769566208744) (13,0.789140742617) (14,0.819340189949) (15,0.761357917856) (16,0.763339845644) (17,0.781999988453) (18,0.780287210131) (19,0.784426418352) (20,0.830249577644) (21,0.786997332153) };
\addplot coordinates {(0,0.727817235623) (1,0.592538358694) (2,0.78693376975) (3,0.584645806506) (4,0.538797814208) (5,0.436852461868) (6,0.649525469688) (7,0.689025281309) (8,0.668929736629) (9,0.54126153079) (10,0.652943662285) (11,0.760376697542) (12,0.612274466328) (13,0.650077459334) (14,0.687853221054) (15,0.606652052744) (16,0.595731324545) (17,0.60288782204) (18,0.651691287007) (19,0.658387934883) (20,0.691156421819) (21,0.626229085368) };
\addplot coordinates {(0,0.923513766084) (1,0.88819167142) (2,0.908112351578) (3,0.911689335699) (4,0.837159871214) (5,0.904458598726) (6,0.916346564234) (7,0.925001847245) (8,0.916390264519) (9,0.751412429379) (10,0.903345724907) (11,0.861852433281) (12,0.909284725242) (13,0.850416171225) (14,0.898665795911) (15,0.889840905299) (16,0.836666666667) (17,0.97851453973) (18,0.900727763203) (19,0.902897112976) (20,0.903973152915) (21,0.922217720933) };
\legend{tokens,extents,matched extents}
\end{axis}
\end{tikzpicture}


\end{document}
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Nov 24 '14 at 4:48
  • @ChristianHupfer I know that a standard comment is usually useful, but what should OP show in this case? An attempt (pgfplots colored bar plot) which is useless for him/her? – Przemysław Scherwentke Nov 24 '14 at 4:54
  • @PrzemysławScherwentke: Yes, as it helps to clarify the question. Not sure I would know what to make of the question without the MWE (although in this case there are numerous packages that are not relevant to the MWE). – Peter Grill Nov 24 '14 at 6:05
  • @PrzemysławScherwentke: Well, it was just about the \documentclass{} etc. stuff, nothing more. I am aware that the OP could not provide a huge code for this ;-) – user31729 Nov 24 '14 at 13:12
0

Perhaps just a simple line plot?

enter image description here

Code:

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{width=9cm,compat=1.8}


\begin{document}
\begin{tikzpicture}
\begin{axis}[
%    ybar,
    enlargelimits=0.01,
    legend style={at={(0.5,-0.15)},
      anchor=north,legend columns=-1},
    ylabel={Fleiss' Kappa ($\kappa$)},
%    symbolic x coords={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21},
    xtick=data,
%    nodes near coords,
%    every node near coord/.append style={font=\tiny},
%    nodes near coords align={vertical},
    %% Added
    ymin = 0.4,
    ymax = 1,
    xticklabel style={font=\tiny}
    ]
\addplot coordinates {(0,0.820634615371) (1,0.749387104566) (2,0.877447627014) (3,0.730605521817) (4,0.721264576953) (5,0.712448104015) (6,0.826797749795) (7,0.799574244172) (8,0.787091644026) (9,0.684913627639) (10,0.789086760885) (11,0.857439617666) (12,0.769566208744) (13,0.789140742617) (14,0.819340189949) (15,0.761357917856) (16,0.763339845644) (17,0.781999988453) (18,0.780287210131) (19,0.784426418352) (20,0.830249577644) (21,0.786997332153) };
\addplot coordinates {(0,0.727817235623) (1,0.592538358694) (2,0.78693376975) (3,0.584645806506) (4,0.538797814208) (5,0.436852461868) (6,0.649525469688) (7,0.689025281309) (8,0.668929736629) (9,0.54126153079) (10,0.652943662285) (11,0.760376697542) (12,0.612274466328) (13,0.650077459334) (14,0.687853221054) (15,0.606652052744) (16,0.595731324545) (17,0.60288782204) (18,0.651691287007) (19,0.658387934883) (20,0.691156421819) (21,0.626229085368) };
\addplot coordinates {(0,0.923513766084) (1,0.88819167142) (2,0.908112351578) (3,0.911689335699) (4,0.837159871214) (5,0.904458598726) (6,0.916346564234) (7,0.925001847245) (8,0.916390264519) (9,0.751412429379) (10,0.903345724907) (11,0.861852433281) (12,0.909284725242) (13,0.850416171225) (14,0.898665795911) (15,0.889840905299) (16,0.836666666667) (17,0.97851453973) (18,0.900727763203) (19,0.902897112976) (20,0.903973152915) (21,0.922217720933) };
\legend{tokens,extents,matched extents}
\end{axis}
\end{tikzpicture}


\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.