Tag Info

Hot answers tagged

7

A first - though simple - approach - would be to treat all 3 sides as surfaces themselves. So by just setting one or another component to 0, one would obtain \documentclass{article} \usepackage{pgfplots} %\pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ axis equal, axis lines = center, width = 10cm, height = 10cm, ...


5

I guess your problem was commas. Commas separate tuples, so if you have a comma in one parameter, you should surround it by curly brackets. For me this code works. \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{tikz} % \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin = 0, xmax = 10, ymin = ...


5

You can move the \draw outside of the \foreach and then you do not need to use the expansion: Notes: Normally one would need to use axis cs: coordinate system within an axis environment. But, as Manuel commented, in pgfplots version 1.11 this is now the default coordinate system. So, if using a version prior to 1.11 each coordinate needs to be ...


4

The yticklabel style={anchor=west} was the culprit that was resulting in the labels on the wrong side. Commenting that out yields: Notes: I also changed the fill in ticklabel style={font=\tiny,fill=none} as it was whiting out some of the graph. Code: \documentclass[10pt]{amsart} \usepackage{tikz} ...


4

As soon as I posted it I found a workaround: \documentclass[png]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.10} \pgfplotsset{ every axis/.append style={ xmin=-1,xmax=1,ymin=-1,ymax=1, view={0}{90}, width=4cm, axis equal image }, every axis plot/.append style={ blue,-stealth, ...


3

The PGF math engine is just not precise enough for these kinds of ranges. If you use gnuplot to do the calculations instead (by replacing expression by gnuplot in your code), you get the correct output: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[>=stealth] \begin{axis}[ ...


3

The problem is in passing \draw to \edef; precede it with \noexpand: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin = 0, xmax = 10, ymin = 0, ymax = 10, ] \foreach \linker / \regter in {{(1,1) / (2,2)}, {(2,2) / (3,3)},{(3,3)/(4,4)}} { ...


3

Quick and dirty: \documentclass[tikz,border=5]{standalone} \tikzset{declare function={y(\x)=4-\x^2;}, plot fill/.style={fill=purple!75}, plot/.style={draw=black!80, thick}, bar/.style={fill=cyan, draw=white, thick}, marking/.style={fill=cyan!50!black, draw=cyan!50!black}, axis/.style={thick, draw=black!65, stealth-stealth} } \begin{document} ...


2

You should switch to PST-solides3d, which can produce much satisfying projection of texts and also figures. See the following examples from its documentation:


2

I wasn't sure whether you wanted flat or vertical letters, so I did both. Note the use of [scale mode=scale uniformly]. Also note that yscale is the denominator of xslant, and xscale is the denominator of yslant. \documentclass{standalone} \usepackage{tikz,pgfplots} \usetikzlibrary{positioning,3d} \pgfplotsset{compat=1.10} \begin{document} ...


2

The error message is generated if pgfplots cannot open the input file. That, in turn, indicates search path problems of some sort: apparently, it did not find the file. Please ensure that it is on the search path. Is it in the same directory of your .tex file? If not, is it on the path for TEXINPUTS?


2

I can suggest this solution, using my package xpicture. You can add colors, if you want, but for a more sophisticated design use the tikzpicture package. \documentclass{standalone} \usepackage{xpicture} \usepackage{ifthen} \begin{document} \newqpoly{\f}{4}{0}{-1} % Define f(x)=4-x^2 \referencesystem(0,0)(2,0)(0,1) % Change ...


2

The key clip is a two-dimensional construct which is applied after the 3d project. It is only applicable to 3d clipping for special cases. What you want is a parameterized triangle. To this end, you have to find a map X=X(s,t) Y=Y(s,t) for 0<= s <=1 and 0<= t <= 1 such that (X,Y) represents your desired triangle. Let us focus on the simple ...


1

You have a ytick at 0.1 in the second plot hence the ylabel moves to the right considering that extra space. You can make the position of the ylabel to be fixed by ylabel style={at={(rel axis cs:-0.1,0.5)}} You will find various cs (like ticklabel cs) systems for this in the manual (besides rel axis cs, that I have used) ...


1

One way would be to plot the curve and clip it by \clip (-1, -1) -- (-1, 1) -- (1, -1) -- cycle; \addplot3[surf,domain=-1:1,y domain=-1:1] {x*y}; \documentclass[10pt]{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[xlabel=$x$,ylabel=$y$,small,view={120}{40}] \clip (-1, -1) -- (-1, 1) -- (1, ...


1

Put xscale=-1 in tikzpicture options. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usepgfplotslibrary{ternary} \pgfplotsset{width=9.5cm, height=9.5cm} \begin{document} \begin{tikzpicture}[xscale=-1] %%% <------------------ \begin{ternaryaxis}[ ternary limits relative=false, xlabel= x, ylabel= y, zlabel= z, xmin=0, ...



Only top voted, non community-wiki answers of a minimum length are eligible