[pstricks] Graphs within list environment

bereket T bermaths at yahoo.com
Wed Dec 5 10:58:53 CET 2007


> Message: 1
> Date: Sat, 24 Nov 2007 07:49:30 -0800 (PST)
> From: bereket T <bermaths at yahoo.com>
> Subject: [pstricks] Graphs within list environment
> To: pstricks at tug.org
> Message-ID:
> <273443.95611.qm at web30005.mail.mud.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
> 
> Hi Everyone:
> 
> I am trying to use PStricks graphs within a list
> environment. However, I am not happy with they way
> it
> looks. Particularly, the position of the numbering
> in
> relation to the graphs. I wish also to put the
> graphs
> side by side so that I can save some space. 
> 
> I have also the same problems with equations and
> matrices in latex. Does someone have any idea on how
> to go around this problem.
> 
> I have included an example.
> 
> Thanks very much.
> 
> Bereket
> 
> \documentclass[11pt]{article}
> \usepackage{pstricks,pst-plot,pstricks-add}
> 
> %Axes sytle settings
> \newpsstyle{plainAxes}{arrows=->,ticks=none}
> %,linecolor=red
> \newpsstyle{tickedAxes}{arrows=->,ticksize=3pt
> -3pt,labels=none}
> \newpsstyle{labeledAxes}{arrows=->,ticksize=2pt
> -2pt,labelsep=2.5pt,labelFontSize=\footnotesize}
> 
> %Plot style setting
>
\newpsstyle{myplotsytle}{plotpoints=50,linewidth=1pt}
>
\newpsstyle{algeline}{algebraic,style=myplotsytle,plotstyle=line}
>
\newpsstyle{algecurve}{algebraic,style=myplotsytle,plotstyle=curve}
> 
> 
> \begin{document}
> 
> Which of the following graphs represent the graph of
> a
> function.
> \begin{enumerate}
> \item 
>
\begin{psgraph*}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,-2.5)(2.5,2.5){5cm}{!}
> \psplot[style=algeline]{-2.5}{2.5}{x + 1}
> \end{psgraph*}
> 
> \item 
>
\begin{psgraph*}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,-2.5)(2.5,2.5){5cm}{!}
>
\psplot[style=algeline,swapaxes=true]{-2.5}{2.5}{x^2-1}
> \end{psgraph*}
> 
> \item 
>
\begin{psgraph*}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,-2.5)(2.5,2.5){5cm}{!}
> \psplot[style=algeline]{-2.5}{2.5}{x^3}
> \end{psgraph*}
> 
> \item 
>
\begin{psgraph*}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,-2.5)(2.5,2.5){5cm}{!}
> \psplot[style=algeline]{-2.5}{2.5}{abs(x)}
> \end{psgraph*}
> \end{enumerate}
> 
> \end{document}
> 
> 
>      
>
____________________________________________________________________________________
> Get easy, one-click access to your favorites. 
> Make Yahoo! your homepage.
> http://www.yahoo.com/r/hs 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Sat, 24 Nov 2007 22:06:51 +0100
> From: Doris Wagner <doris.wagner at mac.com>
> Subject: Re: [pstricks] Graphs within list
> environment
> To: Graphics with PSTricks <pstricks at tug.org>
> Message-ID:
> <30eb79e13cf297bc11e5aba32905d120 at mac.com>
> Content-Type: text/plain; charset=US-ASCII;
> delsp=yes; format=flowed
> 
> hi bereket,
> 
> if you want to save space, I would not use the
> enumerate-environment.  
> try this:
> \documentclass[11pt]{article}
> \usepackage{pstricks,pst-plot,pstricks-add}
> 
> %Axes sytle settings
> \newpsstyle{plainAxes}{arrows=->,ticks=none}
> %,linecolor=red
> \newpsstyle{tickedAxes}{arrows=->,ticksize=3pt
> -3pt,labels=none}
> \newpsstyle{labeledAxes}{arrows=->,ticksize=2pt
> -2pt,labelsep=2.5pt,labelFontSize=\footnotesize}
> 
> %Plot style setting
>
\newpsstyle{myplotsytle}{plotpoints=50,linewidth=1pt}
>
\newpsstyle{algeline}{algebraic,style=myplotsytle,plotstyle=line}
>
\newpsstyle{algecurve}{algebraic,style=myplotsytle,plotstyle=curve}
> 
> 
> \newcounter{mycounter}\setcounter{mycounter}{1}
> 
> \begin{document}
> 
> (\arabic{mycounter})\stepcounter{mycounter}
> \raisebox{ 
>
-5cm}{\begin{psgraph*}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(
> 
> -2.5,-2.5)(2.5,2.5){5cm}{!}
> \psplot[style=algeline]{-2.5}{2.5}{x + 1}
> \end{psgraph*}
> }%end raisebox
> \arabic{mycounter}\stepcounter{mycounter}
>
\begin{psgraph*}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,
> 
> -2.5)(2.5,2.5){5cm}{!}
>
\psplot[style=algeline,swapaxes=true]{-2.5}{2.5}{x^2-1}
> \end{psgraph*}
> \arabic{mycounter}\stepcounter{mycounter}
>
\begin{psgraph*}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,
> 
> -2.5)(2.5,2.5){5cm}{!}
> \psplot[style=algeline]{-2.5}{2.5}{x^3}
> \end{psgraph*}
> \arabic{mycounter}\stepcounter{mycounter}
>
\begin{psgraph*}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,
> 
> -2.5)(2.5,2.5){5cm}{!}
> \psplot[style=algeline]{-2.5}{2.5}{abs(x)}
> \end{psgraph*}
> 
> \end{document}
>  

Hi Doris Wagner:

Thanks very much. That is what I have been looking
for. In fact, you can put the counter within the
pspicture environment. In this case it looks beter.

\documentclass[11pt]{article}
\usepackage{pstricks,pst-plot,pstricks-add}
 
%Axes sytle settings
\newpsstyle{plainAxes}{arrows=->,ticks=none}
\newpsstyle{tickedAxes}{arrows=->,ticksize=3pt
 -3pt,labels=none}
\newpsstyle{labeledAxes}{arrows=->,ticksize=2pt
-2pt,labelsep=2.5pt,labelFontSize=\footnotesize}

%Plot style setting
\newpsstyle{myplotsytle}{plotpoints=50,linewidth=1pt}

\newpsstyle{algeline}{algebraic,style=myplotsytle,plotstyle=line}

\newpsstyle{algecurve}{algebraic,style=myplotsytle,plotstyle=curve}
 
\newcounter{mycounter}\setcounter{mycounter}{1}
 
\begin{document}
 
\begin{psgraph}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(
 -2.5,-2.5)(2.5,2.5){5cm}{!}
\uput[135](-2.5,2.5){\arabic{mycounter})\stepcounter{mycounter}}
 \psplot[style=algeline]{-2.5}{1.5}{x + 1}
\end{psgraph}\hspace{1cm}
\begin{psgraph}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,-2.5)(2.5,2.5){5cm}{!}
\uput[135](-2.5,2.5){\arabic{mycounter})\stepcounter{mycounter}}
\psplot[style=algeline,swapaxes=true]{-2.5}{2.5}{x^2-1}
\end{psgraph}\\\\

\begin{psgraph}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,
-2.5)(2.5,2.5){5cm}{!}
\uput[135](-2.5,2.5){\arabic{mycounter})\stepcounter{mycounter}}
\psplot[style=algeline]{-1.5}{1.5}{x^3}
\end{psgraph}\hspace{1cm}
\begin{psgraph}[style=plainAxes,xAxisLabel=\textit{x}](0,0)(-2.5,-2.5)(2.5,2.5){5cm}{!}
\uput[135](-2.5,2.5){\arabic{mycounter})\stepcounter{mycounter}}
\psplot[style=algeline]{-2.5}{2.5}{abs(x)}
\end{psgraph}
 
\end{document}
  



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the PSTricks mailing list