Graphics, Figures & TablesDescriptive Statistics

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
jafarHH
Posts: 17
Joined: Tue Jun 28, 2011 2:46 pm

Descriptive Statistics

Post by jafarHH »

Hello guys i need help with Descriptive Statistics,
i don't know how to make these in latex so i need help.
can anybody explain for me how i do it
Last edited by jafarHH on Mon Jul 25, 2011 2:10 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Descriptive Statistics

Post by localghost »

I'm not sure if I understand you right. I found some explanations but I can't figure out what you are after [1]. So, please explain exactly what you want to do and where the problems occur.

[1] Descriptive statistics — Wikipedia, the free encyclopedia


Thorsten
User avatar
jafarHH
Posts: 17
Joined: Tue Jun 28, 2011 2:46 pm

Re: Descriptive Statistics

Post by jafarHH »

There is no real problem,
it's just that i can't find any tutorial or guide that shows how you make descriptive statistics in Latex i mean the commands for it, im pretty new and i need it for an exercise i got from school to do over summer.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Descriptive Statistics

Post by localghost »

jafarHH wrote:[…] it's just that i can't find any tutorial or guide that shows how you make descriptive statistics in Latex i mean the commands for it, […]
I'm afraid that I still can't follow you. Commands for what? Some kind of operations? As far as I understand that, it is only about tables and figures which serve for clear depiction of data. If possible, give a visual example of what you want to achieve.
User avatar
jafarHH
Posts: 17
Joined: Tue Jun 28, 2011 2:46 pm

Re: Descriptive Statistics

Post by jafarHH »

i want to be able to do something like this.
and BTW how do you insert images?
Attachments
piechart3D.jpg
piechart3D.jpg (25.77 KiB) Viewed 5675 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Descriptive Statistics

Post by localghost »

jafarHH wrote:i want to be able to do something like this. […]
Such pie charts can be done with package like pgf/tikZ or PSTricks [1,2]. For a 3D representation it will get a little bit more complicated.
jafarHH wrote:[…] and BTW how do you insert images?
External image files are inserted by the graphicx package.

[1] TikZ examples tag: Charts
[2] PSTricks/Examples/Charts/chart
User avatar
jafarHH
Posts: 17
Joined: Tue Jun 28, 2011 2:46 pm

Re: Descriptive Statistics

Post by jafarHH »

Thx that made it a little bit more clear for me,
one last question how do you do plots,

my dad who is a teacher in the university is using something called matlab but im just in college so i wonder if you could do it in latex.
thanks in advance,

hope i don't get too annoying.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Descriptive Statistics

Post by localghost »

Plots can be done with pgfplots or pst-plot, which are based on the packages I mentioned in my last reply.
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Descriptive Statistics

Post by shadgrind »

You could also use R to produce statistical graphics, including 3D pie charts (though pie charts are usually frowned upon in statistics). R can export to LaTeX formats, including TikZ.

For example, to make a 3D pie chart in R exported to TikZ format, you need the tikzDevice and plotrix packages installed in R, then do this in R:

Code: Select all

library(plotrix)
require(tikzDevice)
tikz('pie3D.tex',standAlone=FALSE,width=5,height=5)
counts <- c(20,29,13,22,16)
types <- c("A","B","C","D","E")
lbls <- paste(types,counts,sep=": ")
lbls <- paste(lbls,"\\%",sep="")
pie3D(counts,labels=lbls,main="Answers for $\\int_1^2 \\frac{dx}{x}$")
dev.off()
That will create a pie3D.tex file which you can then use in LaTeX like this:

Code: Select all

\documentclass{article}
\usepackage{tikz}
\begin{document}
Here is a pie chart created by R:
\begin{center}
   \input{pie3D}
\end{center}
\end{document}
The result will look like this:
tikztest.png
tikztest.png (30.21 KiB) Viewed 5657 times
Notice that you can put LaTeX symbols in the chart. You can also control label positioning and lots of other settings.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
Post Reply