[pstricks] smoothing 3d plot (pst-3dplot with fileplotThreeD)

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sun Nov 20 20:14:55 CET 2011


Am 20.11.2011 18:56, schrieb Toche, Patrick:
> My problem appears to be more serious than centering the pspicture on the page: I have problems locating the dataplot inside the pspicture itself!
>
> When I insert axes, the axes are properly centered. But my dataplot is all over the place, and I can't seem to re-define the axes to nicely wrap the dataplot.
>
> Your suggestions are very welcome. I have found a reference to psgraph in the pst-plot-doc documentation. I'm reading it now and will get back to you if I have any success.
>
> As for your other suggestion,  http://anamorphose.de/rechnen.pdf, one problem is my German. Focusing on the code between the text, I gather that it does something like what Herbert does in his postscript preamble. Problem is, I don't understand a word of it, in any language.
>
> Take this,
>
> \makeatletter%
> \pst at def{ScalePointsThreeD}<%
>      counttomark dup dup cvi eq not { exch pop } if
>      /m exch def /n m 3 div cvi def
>      n {  % checkdata
>        3 -1 roll % y z x
>        dup \xMinVal lt { pop pop pop /m m 3 sub def }{ 3 1 roll m 3 roll

if the current x value is less than \xMinVal, then delete all three
x y z elements from the stack and decrease the number of data records

> } ifelse
>      } repeat % checkdata
>      /n m 3 div cvi def
>         n {
>        tx at 3DPlotDict begin
>        10 mul   %%%% all * 10
>        3 1 roll 10 mul
>        3 1 roll 10 mul
>        3 1 roll
>        saveCoor
>        ConvertTo2D
>        x2D \pst at number\psxunit mul y2D \pst at number\psyunit mul
>        end
>        m 1 sub 1 roll m 1 sub 1 roll /m m 3 sub def
>       } repeat
>   >
> \makeatother%
>
> The comment says that there is some multiplication by a factor of 10.
> % all * 10

that is only an example how one can modify the data for a better
plot in a coodinate system. You can choose any other value, just as
you like.

Herbert

> But what is being multiplied by 10 and why? Perhaps in my case, I need to select another factor? I just don't understand this preamble!
>
> thanks,
>
> Patrick.
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/
>



More information about the PSTricks mailing list