[pstricks] Problem generating a stacked chart with gradient fill styles

DigiFuga (Bas Dekker) bas.dekker at digifuga.nl
Fri Jan 25 14:47:53 CET 2008



Hello all,


I have been working for some time with PSTricks now, and I came  
accross a problem I don't understand and for which I would greatly  
appreciate any help.

I would like to produce a chart with a gradient in the fillstyles of  
the bars, because it matches my company's style rules better. I use  
pst-bar and pst-grad

There is a model file by Herbert Voß on the internet at http://ftp.ktug.or.kr/tex-archive/info/examples/PSTricks4_de/27-3-2.ltx 
.

I tried to process it, but with no luck: the LaTeX first would stop at  
the \StartShownPreambleCommands part, pretending it to be undefined.

I then put the data in an external file, which worked well. Then the  
LaTeX processor came accross a problem saying " keyval: gradangle  
undefined". A look at the PSTricks homepage drew my attention on the  
red remark about the following order of package loading (which I don't  
quite understand). I played around a little bit with the following  
order of package loading, and I managed to LateX the file correctly (I  
think). Another factor is that I have to work together with \TeXtoEPS,  
for some other reasons.

With the following TeX source:

\documentclass{article}
\usepackage{pst-bar,pst-grad,pstricks}
\usepackage{pst-eps}
\begin{document}
\TeXtoEPS
\psset{yunit=0.5}%
\begin{pspicture}(0,-3.5)(10,8)%
\newpsbarstyle{rG} 
{fillstyle=gradient,gradangle=0,gradbegin=red,gradend=white}
\newpsbarstyle{bG} 
{fillstyle=gradient,gradangle=0,gradbegin=blue,gradend=white}
\readpsbardata{\data}{proces.csv}%
\psbarchart[barstyle={rG,bG,green,black},chartstyle=stack,]{\data}%
\end{pspicture}
\endTeXtoEPS
\end{document}

And the proces.csv containing

Onderzoek,Begroting,Realisatie,Test,Implementatie,Onderhoud
0,0.5,3,2,1,0
2,1,1,1,1,0
0,1,0.5,1,0,0
0,0,0,0,0.5,2

The LaTeX processor works fine. The "dvips -E " command also works  
fine. When I try to convert my .ps file to .pdf, it goes wrong:

Error: /typecheck in --rotate--
Operand stack:
    false   1   0.0   0.0   0.0   0.0   1.0   1.0   1.0   1.0   300    
0.9   0.0   false
Execution stack:
    %interp_exit   .runexec2   --nostringval--   --nostringval--   -- 
nostringval--   2   %stopped_push   --nostringval--   -- 
nostringval--   --nostringval--   false   1   %stopped_push   1905    
1   3   %oparray_pop   1904   1   3   %oparray_pop   --nostringval--    
1888   1   3   %oparray_pop   1771   1   3   %oparray_pop   -- 
nostringval--   %errorexec_pop   .runexec2   --nostringval--   -- 
nostringval--   --nostringval--   2   %stopped_push   -- 
nostringval--   --nostringval--   --nostringval--   %array_continue    
--nostringval--   --nostringval--   --nostringval--    
%array_continue   --nostringval--   --nostringval--   (end grestore  
gsave 0.8 SLW 0  setgray 0 setlinecap stroke  grestore )   -- 
nostringval--
Dictionary stack:
    --dict:1144/1684(ro)(G)--   --dict:0/20(G)--   --dict: 
78/200(L)--   --dict:175/300(L)--   --dict:38/200(L)--   --dict:97/200(L)-- 
    --dict:24/25(L)--   --dict:4/40(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.61: Unrecoverable error, exit code 1


I don't have a clue on where to look at, as there are too many  
variables here. The keyval issue which I don't understand about on  
which I don't know if I by-passed it correctly, the \TeXtoEPS command,  
and loading order of the packages.

I use pst-bar 0.7a 2004/09/24 and pst-grad.tex 1.06 2006/11/27

A second question would be what goes wrong with Herbert Voß's file on  
the external dataloader, but that is not the most important issue  
right now.


Thanks for your help!






Bas Dekker



DigiFuga

Vooruitstraat 109
1441 GH Purmerend
Nederland

+31 (0)6 25 00 32 78

bas.dekker at digifuga.nl
www.digifuga.nl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20080125/cbbc9eb0/attachment.html 


More information about the PSTricks mailing list