Hi Rouben, the result actually *is* a sphere - but the coordinate system is skewed because the axes do not have the same units.
The option 'axis equal' for \begin{axis} will fix it. Best regards Christian Am 24.04.2012 03:58, schrieb Rouben Rostamian: > Hello Christian, > > I have a rather basic question about pgfplots. > I am trying to plot a sphere, like this: > > \documentclass{article} > \usepackage{pgfplots} > \begin{document} > \begin{tikzpicture} > \begin{axis}[view={60}{30}] > \addplot3[surf, z buffer=sort, domain=0:180, y domain=0:360] > ({sin(x)*cos(y)}, > {sin(x)*sin(y)}, > {cos(x)} > ); > \end{axis} > \end{tikzpicture} > \end{document} > > The result appears to be an ellipsoid rather than a sphere. > (I am using pgfplots 1.4.1.) I suspect that I have failed > to specify an essential parameter. I searched the manual > but didn't find the necessary information. Would you please > tell me how to make a sphere that looks like a sphere? > > Rouben > > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Pgfplots-features mailing list Pgfplots-features@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pgfplots-features