Hello Janis,
thanks for the report!
Concerning the misplaced labels: this is a known bug in pgfplots, sorry
about that. A work-around is to use
xlabel style={at={(rel axis cs:0.9,0,0)},anchor=center}
and similar values for ylabel style and zlabel style. Here, 0.9,0,0
means "90%" of the x axis, 0% of y and 0% of z. The current behavior is
to place labels at the positions for the standard 'axis lines' setting
(which is wrong).
Perhaps someone else has the time to look into the question how to
reproduce the angles. I would suppose that you have to apply the
transformation from 3d polar coords to cartesian coords manually and
insert the correct angles. It all boils down to 3D graphics instructions
- a task for which pgf and the mentioned 3dplot package appear to be
pretty good. Pgfplots is good when it comes to data visualization like
scatter, mesh, or surface plots (or even quiver plots which are probably
closest to your request).
I would expect that you can combine both pgfplots for the axis (up to
that unfortunate bug) and any data visualization tasks and the 3dplot
package for the 3D graphics stuff. Perhaps someone has time to create an
example. It may be that it some special keys to synchronize the
coordinate systems of pgfplots and pgf are useful (compare the manual
section of pgfplots which explains how to configure the transformations
of pgfplots to simplify such drawing instructions). See also the
\pgfplotsextra instruction; it may be necessary to encapsulate the
\td*plot commands by \pgfplotsextra{\td*plot....} .
Best regards
Christian
Am 31.01.2012 17:35, schrieb Janis Beckert:
> Hello!
>
> I am trying to draw a very simple 3d plot, actually trying to do
> something like this:
> http://www.texample.net/tikz/examples/the-3dplot-package/ ; is there
> maybe a similar example? I am especially confused as how to tackle the
> angles between angle and vectors...
>
> Anyhow, I already run into problems placing the x-, y-, and z-labels
> correctly.
>
> If I just place the xlabel, you can already see that the position is
> badly out of place:
> http://ompldr.org/tY2p5bA
>
> However, if I then also place the ylabel, the entire thing breaks down:
> http://ompldr.org/tY2p5bQ
>
>
> What am I doing wrong here?
>
> Code is attached below.
>
> All the best,
> Janis
>
>
> Here is my code:
> \documentclass{standalone}
>
> \usepackage{tikz}
> \usetikzlibrary{arrows}
> \usepackage{pgfplots}
>
> \begin{document}
>
> \pgfmathsetmacro{\rvec}{.8}
> \pgfmathsetmacro{\thetavec}{30}
> \pgfmathsetmacro{\phivec}{60}
>
> \begin{tikzpicture}
> \begin{axis}[
> view={115}{30},
> axis lines=center,
> xlabel=$e^1$,
> ylabel=$e^2$,
> z post scale=1.5
> ]
>
> \addplot3[-stealth',domain=0:4] ({x*sin(\thetavec)*cos(\phivec)},%
> {x*sin(\thetavec)*sin(\phivec)},%
> {x*cos(\thetavec)});
> \end{axis}
> \end{tikzpicture}
>
> \end{document}
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Pgfplots-features mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pgfplots-features
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Pgfplots-features mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pgfplots-features