PSTricks bar chart

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{demo.dat}
3,1,2,3,9,3,8,2,
1,5,6,5,7,2,4,6,
4,9,5,8,9,3,6,4,
\end{filecontents*}
\usepackage{pstricks}
\usepackage{amsmath}
\usepackage{pst-bar}
\usepackage{pstricks-add}
\pagestyle{empty}
\parindent=0pt
\def\xText{What,may,that,be,?,Any,ideas,?}
\newcounter{Message}
\begin{document}
\psset{xunit=1.20cm,yunit=.5cm}
\psset{yticksize=0 12cm}
\def\psvlabel#1{#1\,$\nu$}
\setcounter{figure}{5}
\begin{pspicture}(10,10)
\psframe[fillstyle=solid,fillcolor=black!10,linestyle=none](0,0)(10,10)
\psaxes[ticks=y,labels=y,Dx=1,Dy=1](0,0)(10,10)
\readpsbardata[header=false]{\data}{demo.dat}
\psbarchart[barstyle={white,blue,gray}]{\data}
\psforeach{\nA}{\xText}{\stepcounter{Message}\rput[rb]{45}(\theMessage,-3mm){\nA}}
\end{pspicture}
\end{document}