Quantcast

A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

MathSofiya

  • 2 years ago

I'm having trouble making a box and whiskers plot using \LaTeX. I'm currently checking out an example I found on stackexchange http://tex.stackexchange.com/questions/3983/can-i-use-pgfplots-to-make-a-boxplot I'm specifically looking at the answer posted by Herbert

  • This Question is Closed
  1. MathSofiya
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    brb...like, 15 mins

  2. MathSofiya
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Is "pspicture" an indication to make a graph?

  3. MathSofiya
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I copied and pasted the code that jake made, and it worked for me. Now I just gotta figure out how to tweak it to make my data values fit.

  4. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    how does it work?

  5. MathSofiya
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I copied and pasted it into my document in sharelatex.com and I was able to produce a pdf document....haha...Sorry I'm soo new to this, my programming language is very beginner like. \documentclass{article} \usepackage{pgfplots} \usepackage{filecontents} \begin{filecontents}{testdata.dat} 0 1 1.2 0.4 1.5 0.2 1 2 2.3 1.5 2.7 1 2 0.7 1.4 0.5 1.9 0.1 \end{filecontents} \pgfplotsset{ box plot/.style={ /pgfplots/.cd, black, only marks, mark=-, mark size=1em, /pgfplots/error bars/.cd, y dir=plus, y explicit, }, box plot box/.style={ /pgfplots/error bars/draw error bar/.code 2 args={% \draw ##1 -- ++(1em,0pt) |- ##2 -- ++(-1em,0pt) |- ##1 -- cycle; }, /pgfplots/table/.cd, y index=2, y error expr={\thisrowno{3}-\thisrowno{2}}, /pgfplots/box plot }, box plot top whisker/.style={ /pgfplots/error bars/draw error bar/.code 2 args={% \pgfkeysgetvalue{/pgfplots/error bars/error mark}% {\pgfplotserrorbarsmark}% \pgfkeysgetvalue{/pgfplots/error bars/error mark options}% {\pgfplotserrorbarsmarkopts}% \path ##1 -- ##2; }, /pgfplots/table/.cd, y index=4, y error expr={\thisrowno{2}-\thisrowno{4}}, /pgfplots/box plot }, box plot bottom whisker/.style={ /pgfplots/error bars/draw error bar/.code 2 args={% \pgfkeysgetvalue{/pgfplots/error bars/error mark}% {\pgfplotserrorbarsmark}% \pgfkeysgetvalue{/pgfplots/error bars/error mark options}% {\pgfplotserrorbarsmarkopts}% \path ##1 -- ##2; }, /pgfplots/table/.cd, y index=5, y error expr={\thisrowno{3}-\thisrowno{5}}, /pgfplots/box plot }, box plot median/.style={ /pgfplots/box plot } } \begin{document} \begin{tikzpicture} \begin{axis} [enlarge x limits=0.5,xtick=data] \addplot [box plot median] table {testdata.dat}; \addplot [box plot box] table {testdata.dat}; \addplot [box plot top whisker] table {testdata.dat}; \addplot [box plot bottom whisker] table {testdata.dat}; \end{axis} \end{tikzpicture} \end{document}

  6. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    never tried texing!! ... what do you use to compilte it?

  7. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    *complie?

  8. MathSofiya
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    No clue honestly. I just log into sharelatex.com and there I copy and past the code. Or I make my own code, very basic codes, to turn in my math homework or statistics homework.

  9. MathSofiya
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    @Hero

  10. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.