Graphics, Figures & Tablespst-3dplot and it's axes

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

pst-3dplot and it's axes

Post by Bozack »

Hi,

I've just started trying to learn how to plot graphs in 3 dimensions with the PStricks package pst-3dplot. But I have a little problem: The default axes made by the package are red, which I really do not like.

I've edited the package itself to actually make them black - but this isn't a smart way to do it, since I have to do this little hack on every computer I compile my file with.

Is there any way to tell pst-3dplot to make the axes another color? The figure I'm plotting is as follows:

Code: Select all

\psset{xunit=5.5mm,yunit=8mm}
\begin{pspicture}(-2,-10)(20,4)  %\psgrid
	%Egenskaber for 3D-plot: 
	\psset{Alpha=50,nameX=$y$,nameY=$z$,nameZ=$x$}
	\pstThreeDCoor[yMax=25,xMax=5]
	%Plotter de to bølger og deres stiplede linier:
	\parametricplotThreeD[xPlotpoints=200,linecolor=rapportfarvebleg,linewidth=1.5pt,linestyle=solid,plotstyle=curve](0,720){ 0 t 180 div 6 mul t sin 2.5 mul }
	\parametricplotThreeD[xPlotpoints=200,linecolor=YellowGreenbleg,linewidth=1.5pt,linestyle=solid,plotstyle=curve](0,720){ t sin 2.5 mul t 180 div 6 mul 0 }
	%Konfigurerer og plotter deres pile:
	\psset{arrows=->,arrowscale=1.5,linewidth=0.5pt}
	\parametricplotThreeD[yPlotpoints=44,linecolor=YellowGreenbleg](0,2.5)(15,720){ u sin t mul u 180 div 6 mul 0 }
	\parametricplotThreeD[linecolor=rapportfarvebleg,yPlotpoints=44](0,2.5)(0,720){ 0 u 180 div 6 mul u sin t mul }
\end{pspicture}
I've attached the whole file including preamble too.
Attachments
test.tex
(19.06 KiB) Downloaded 280 times
Last edited by Bozack on Sun Jan 25, 2009 5:53 pm, edited 1 time in total.
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

pst-3dplot and it's axes

Post by localghost »

Bozack wrote:[...] I've edited the package itself to actually make them black - but this isn't a smart way to do it, since I have to do this little hack on every computer I compile my file with. [...]
Apart from the fact that it is never a good idea to modify a package, there is a much more easier way to get a different line color.

Code: Select all

\pstThreeDCoor[linecolor=black,yMax=25,xMax=5]
Since this command is only built from other pstricks commands, you can use quite normal parameters to influence the appearance of the output.


Best regards
Thorsten¹
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

pst-3dplot and it's axes

Post by Bozack »

localghost wrote:Apart from the fact that it is never a good idea to modify a package, there is a much more easier way to get a different line color.

Code: Select all

\pstThreeDCoor[linecolor=black,yMax=25,xMax=5]
I could have sweared that I had already tried that and it didn't work :? But well, never too late to learn. Thanks, it worked like a charm.
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
Post Reply