Welcome to the PSTricks web site pst-plot -- Introduction |
|||||||||||||||||||||||||||||||||||||
|
You can download the complete LaTeX example file or
the PDF. This page is a general introduction.
In LaTeX preamble write:
\usepackage{pst-plot}It is possible to put all of them in one ore more floats. Some exponential functions The code for this is: \psset{unit=1cm} \begin{pspicture}(-4,-0.5)(4,8) \psgrid[subgriddiv=0,griddots=5,gridlabels=7pt](-4,-0.5)(4,8) \psline[linewidth=1pt]{->}(-4,0)(+4,0) \psline[linewidth=1pt]{->}(0,-0.5)(0,8) \psplot[plotstyle=curve,linewidth=1.5pt]{-4}{0.9}{10 x exp}% postscript function \rput[l](1,7.5){$10^x$} \psplot[plotstyle=curve,linewidth=1.5pt]{-4}{3}{2 x exp}% postscript function \rput[l](2.2,7.5){$e^x$} \psplot[plotstyle=curve,linewidth=1.5pt]{-4}{2.05}{2.7183 x exp}% postscript function \rput[l](3.2,7.5){$2^x$} \end{pspicture}The commands: \psset{unit=1cm} % factor for the x and y-unit % \begin{pspicture}(-4,-0.5)(4,8) % defines the area which is reserved for the picture, % it's from the lower left to the upper right corner. % Means a x-width of 8 and a y-width of 8.5 % \psgrid[subgriddiv=0,griddots=5,gridlabels=7pt](-4,-0.5)(4,8) % the grid with a subgriddepth of 1 unit, 10 dots per grid % and the labels with a size of 7pt. The grid goes from lower % left to upper right of the complete pspicture-area. % \psline[linewidth=1pt]{->}(-4,0)(+4,0) % the x-axis % \psline[linewidth=1pt]{->}(0,-0.5)(0,8) % the y-axis % \psplot[plotstyle=curve,linewidth=1.5pt]{-4}{0.9}{10 x exp}% postscript function % plots the funtion 10x for (-4<x<0.9) as a curve with % a linewidth of 1.5pt. % \rput[l](1,7.5){$10^x$} % puts in mathmode ($...$) the function name as text beside the curve. % \psplot[plotstyle=curve,linewidth=1.5pt]{-4}{3}{2 x exp}% postscript function % plots the funtion 2x for (-4<x<3) as a curve with % a linewidth of 1.5pt. % \rput[l](2.2,7.5){$e^x$} % s.a. % \psplot[plotstyle=curve,linewidth=1.5pt]{-4}{2.05}{2.7183 x exp}% postscript function % plots the funtion ex for (-4<x<2.05 as a curve % with a linewidth of 1.5pt. % \rput[l](3.2,7.5){$2^x$} % s.a. % \end{pspicture}Another plot (only for information). log-functions (invers exponential functions)
|