Graphics, Figures & Tablespstricks | Positioning of Pictures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
argan
Posts: 18
Joined: Thu May 05, 2011 10:46 am

pstricks | Positioning of Pictures

Post by argan »

Hi,

I have a lot of problems trying to position my pictures with pstricks. I wish to place two graphs next to each other, and by googling I found out I could do that using minipage. But still, I don't really understand what is happening with them. They seem to somehow start at zero, but then they extend up beyond the page for some reason. And if I change the axes setting, the only thing that happens is that they are cut off instead.

My code for the two figures:

Code: Select all

\begin{figure}[!ht]
	\begin{minipage}{0.5\textwidth}
	\centering
		\begin{pspicture}(4,4)
			\psset{xunit=4cm,yunit=20cm}			
			\listplot[linecolor=green]{\naeighteen}
			\listplot[linecolor=blue]{\nathirty}
			\listplot[linecolor=black]{\naforty}
			\listplot[linecolor=red]{\nafifty}
			\psaxes[axesstyle=frame,linewidth=0.5pt,Dx=0.2,Dy=0.05,Ox=0.0,Oy=0.0]{->}(0.02,0)(1,0.2)
		\end{pspicture}
	\end{minipage}
	\begin{minipage}{0.5\textwidth}
	\centering
		\begin{pspicture}(4,4)
			\psset{xunit=4cm,yunit=0.8cm}			
			\listplot[linecolor=green]{\naeighteen}
			\listplot[linecolor=blue]{\nathirty}
			\listplot[linecolor=black]{\naforty}
			\listplot[linecolor=red]{\nafifty}
			\psaxes[axesstyle=frame,linewidth=0.5pt,Dx=0.2,Dy=1,Ox=0.0,Oy=20]{->}(0.02,0)(1,5)
		\end{pspicture}
	\end{minipage}
	\label{chemical_concentrations}	
\end{figure}
These are two images of when I'm using the axes set to (0.02,0)(1,5) and (0.02,20)(1,25) respectively.
no-axes.jpg
no-axes.jpg (15.47 KiB) Viewed 2703 times
axes.jpg
axes.jpg (20.93 KiB) Viewed 2703 times
I guess I have a general question as well; when you write the begin{pspicture} and the coordinates after that are supposed to be entered, what are the coordinates relative to? Also, sometimes I have seen that only one set of coordinates is entered, what does this mean? I tried too look for this in the documentation, but I didn't really find anything useful. I used (4,4) in the code above just because it happened to work.

Thanks,
Björn
Last edited by localghost on Sun Feb 12, 2012 10:26 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply