[pstricks] \pst-func

Patrice Mégret Patrice.Megret at fpms.ac.be
Tue Dec 9 13:33:02 CET 2008


Dear Herbert,

Thanks a lot.


I am using pst-func to plot functions with \psIntegral.
In the documentation, (page 21) <x t function> and <x function> should be written <t x function> and <t function> to be compatible with the relations 16 to 18 and with the stack order.

My functions are:

F(x,t)=60*\int_0^pi (cos(2pixcos(t))-cos(2pix))^2/sin(t) dt

and: 

D = 2*(cos^2(2pix))/F

I have no problem to draw F with \psIntegral:

\documentclass[11pt,twoside]{article}
\usepackage{pstricks}
\usepackage{pst-func}
\usepackage{pstricks-add}
\begin{document}
\pstVerb{/F {exch dup 3 -1 roll 2 mul Pi mul dup 3 -1 roll COS mul COS exch COS sub 2 exp exch SIN div 60 mul} bind def}
% ce code définit la fonction [cos(2pix cos(t))-cos(2pix)]^2 / sin(t) avec x=h/lambda
\psset{llx=-1.5cm,lly=-0.5cm,urx=0.2cm,ury=0.2cm,xAxisLabel={$h/\lambda$},xAxisLabelPos={0.5,-45},yAxisLabel={$R_r$ en ohms},yAxisLabelPos={-0.1,150}}
\begin{psgraph}[Dy=50,Dx=0.1,xticksize=300 0,yticksize=1 0, comma=true,axesstyle=frame](0,0)(1,300){10cm}{5cm}
\psIntegral[Simpson=100,plotpoints=200,linecolor=orange,linewidth=1.5pt]{0}{1}(0.01,3.13){F}
\end{psgraph}
\end{document}

but I don't see how I can draw D? Maybe I should use the Simpson integration routine inside pst-func.pro but it is not clear for me how to use it. 

By the way, there is a small trouble with the labeling on the x-axis: if Dx=0.1, the last label 1.0 is not printed, if Dx=0.2, the last label 1.0 is printed. To solve the problem, in my final version I have put 1.001 as the max x-axis and Dx=0.1.
  
Best regards,

Patrice


-----Message d'origine-----
De : pstricks-bounces at tug.org [mailto:pstricks-bounces at tug.org] De la part de Herbert Voss
Envoyé : lundi 8 décembre 2008 23:11
À : Graphics with PSTricks
Objet : Re: [pstricks] psPrintValue

Patrice Mégret schrieb:

> Is it possible to have an option in \psPrintValue to choose the decimal separator as . or ,?

Patrice,

try http://perce.de/PSTricks/pst-func/pst-func.tex
it knows \psPrintValue[comma,....]...
See example in the documentation for the y=sqrt(x)

Herbert
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks


More information about the PSTricks mailing list