[pstricks] Plotting a function

Cosi Lein cosi_lein at gmx.net
Sun Jun 1 18:31:36 CEST 2008


Dear Herbert and Markus,

thank you for the quick reply.

@Markus: I already used "algebraic" (see options for psset) - I think I
don't have to use it in \psplot again?

@Herbert: a "unit-problem" seems plausible... But if I use your
suggestion, I get a line instead of my function? 

The function is a profit function (reverse parabola) with a maximum in
(x=60.000, y=18.000.000) and two roots in x=0 and x=120.000 - so I need
these large scales. How can I generate these scales? (I suspect it's
very easy, but I don't see solution...)

Thank you twice in advance,
Cosi.

-----Ursprüngliche Nachricht-----
Von: pstricks-bounces at tug.org [mailto:pstricks-bounces at tug.org] Im
Auftrag von Herbert Voss
Gesendet: Sonntag, 1. Juni 2008 17:36
An: Graphics with PSTricks
Betreff: Re: [pstricks] Plotting a function


Cosi Lein schrieb:

> I want to plot this function:
>  
> -0.005x^2+600x-20000

> Is there anyone who find my mistake?

A problem with the units ...

\documentclass{article}
\pagestyle{empty}
\usepackage{pstricks-add}

\begin{document}
\psset{algebraic,xunit=1mm,yunit=0.001mm}
\begin{pspicture}(0,-15000)(125,40000)
\psaxes[dx=1.5cm, dy=0.5cm,
	Dx=15,Dy=5000,ticksize=-2pt,
	linewidth=0.7pt]{->}(0,0)(100,40000)
\psplot[linewidth=1pt,linecolor=red]{0}{100}%
	{-0.005*x^2+600*x-20000}
\psdot(*60 {-0.005*x^2+600*x-20000})
\end{pspicture}

\end{document}


Herbert

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




More information about the PSTricks mailing list