Graphics, Figures & Tables ⇒ vertical chart
vertical chart
Is it possible to create vertical or horizontal charts in Latex? Something like this:
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: vertical chart
Just like that, let's say as easily as you would in Excel, NO!!!
You can always make a figure in LaTeX, but to do what you have in attachment would take you forever to make, and it would be static.
Therefore, you are better of in other software, and include it in your text document.
Cheers
You can always make a figure in LaTeX, but to do what you have in attachment would take you forever to make, and it would be static.
Therefore, you are better of in other software, and include it in your text document.
Cheers
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
vertical chart
I sometimes wonder where you get your insights from.fatra2 wrote:Therefore, you are better of in other software, and include it in your text document.
This can be done very easy with datatool, pgfplots (based on pgf/tikZ) or pstricks. You may take a look at example galleries [1,2]. I'm sure you will find what you need and get along with it.krislodz wrote:Is it possible to create vertical or horizontal charts in Latex? Something like this […]
[1] TikZ and PGF examples
[2] /PSTricks/Examples/Charts/chart
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: vertical chart
See the attached file. This is the file graphs.dat:
,,,,,,,
5, 1, 9, 4, 8, 3, 2, 5
,,,,,,,
5, 1, 9, 4, 8, 3, 2, 5
- Attachments
-
- graphs.tex
- (811 Bytes) Downloaded 649 times
Re: vertical chart
yago, very very nice. i cannot use pdflatex on it, so I guess I have to include eps generated to my document?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
vertical chart
Include the (auto-)pst-pdf package. It lets you compile pstricks code with the pdflatex compiler engine. Pay special attention to the hints in the manual about shell escape (forum search).krislodz wrote:[…] i cannot use pdflatex on it, so I guess I have to include eps generated to my document?
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: vertical chart
It is compiling, however only the chart is included, without the surrounding text on the axes
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
vertical chart
By now you should know that without a minimal working example (MWE) it becomes very difficult to give further help.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
vertical chart
Example is the same code snippet that was considered only with auto-pstpdf package and -shell-escape latexpdf switch. graphs.dat stays the same :
,,,,,,,
5, 1, 9, 4, 8, 3, 2, 5
Current graphs.tex:
,,,,,,,
5, 1, 9, 4, 8, 3, 2, 5
Current graphs.tex:
Code: Select all
\documentclass[spanish]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\usepackage{ifplatform}
\usepackage{pst-pdf}
\usepackage{xkeyval}
\usepackage[crop=off]{auto-pst-pdf}
\deactivatetilden
\usepackage{pst-bar,pst-all,pstricks-add}
\begin{document}
\psset{xunit=1cm,yunit=1cm}%
\renewcommand*\psbarlabelsep{50pt}
\begin{pspicture}(0,0)(10,9)%
\psgrid[yunit=1cm,gridlabels=0,subgriddiv=0,griddots=30](0,0)(10,8.1)%
\psaxes[labels=all,ticks=x](0,0)(10,9)%
\readpsbardata{\graphs}{graphs.dat}%
\psbarchart[labelFontSize=2pt,shadow=true,barstyle=blue,barcolsep=0.3,orientation=horizontal]{\graphs}%
\rput(-1.4,7.5){Scatter Graphs}
\rput(-1.7,6.5){Frequency Polygon}
\rput(-1.25,5.5){Line Graphs}
\rput(-1.75,4.5){Comp. Pie Graphs}
\rput(-1.2,3.5){Pictograms}
\rput(-1.2,2.5){Histograms}
\rput(-1.2,1.5){Pie Graphs}
\rput(-1.2,0.5){Bar Charts}
\end{pspicture}
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
vertical chart
It works for me without any option for auto-pst-pdf.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10