Tag Info

New answers tagged

1

The problem arises here because your line to path uses the border of the nodes not only to draw the edges but also to position the nodes along that path. If you would use the .center anchors of the nodes to position the edge labels they would be on the same height for the same position. I changed a little bit of your figure setup, for instance I used the ...


4

Here's a variation of the tree you produced using forest. Note that part of the problem here is that I have no idea how to hyphenate something like text1lenght2. I've therefore assumed that these cannot be hyphenated. If they could, you could create a nicer result. To avoid allowing the tree to expand beyond reason, I've therefore defined a style ...


2

To make the picture look better, I finally figured out how to install forest. I opened package manager of MikTex from StatMenu->Programs->MikTex->PackageManger. I installed forest. From installation directory, I copied forest.sty and pasted in the current working directory. Using forest, this is how the above diagram looks like. Code: ...


4

Let us fix this meta-path. \documentclass[border=9,tikz]{standalone} \usetikzlibrary{decorations.pathmorphing} \begin{document} \tikzset{ demo decoration/.style={ gray, postaction={draw=red,decorate,decoration=#1} } } \begin{tikzpicture}[remember picture] \path(0,0)coordinate(A){}(3.7,0)coordinate(B){}(3.8,0)coordinate(C){}; ...


1

To modify the styling of the axis lines, use <axis> axis line style={<styles>}, where <axis> is the axis to modify (x, y, z, or omit to style all axes) and <styles> is the styling to apply. So, we can use axis line style={-} in the axis options to override the axisStyle and locally set no arrow tip for the axis line. Here I've ...


1

The grid is drawn behind the plots by default, so in your case it's not visible. Set axis on top, and you'll get a grid.


4

Defining a style creates another macro argument layer, so you need to double the #, like this: content/.wrap pgfmath arg={##1}{content("!u")*\p},


2

Here's an approach of displaying your data that doesn't use pie charts, but a slopegraph: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[y=0.35cm, x=2cm] \foreach \nameA/\offsetA/\valA/\valB/\nameB/\offsetB in { Australia/ 0/ 20/ 32/ Australia/ 0, Jamaica/ 0/ 18/ 4/ Jamaica/ 0, Suriname/ 0/ 10/ -1/ / ...


2

A PSTricks solution: \documentclass{article} \usepackage{pstricks-add} \usepackage{expl3} \ExplSyntaxOn \cs_new_eq:NN \calc \fp_eval:n \ExplSyntaxOff % parameters \def\boxWidth{3.4} \def\boxHeight{0.7} \def\separation{1} \def\arrow{0.4} % helping functions \def\constA#1#2{\calc{#1*\boxHeight+#2*\separation}} \def\constB#1{\calc{1+#1*\arrow}} ...


6

Somewhat simpler variant using the perpendicular syntax (|- or -|): \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \tikzstyle{bordered} = [draw,thick,inner sep=5,minimum size=10,minimum width=100,font=\sffamily] \tikzstyle{arrow} = [thick,-latex,font=\sffamily] ...


9

There are probably various approaches to this. This example shows one that I frequently use. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \tikzstyle{bordered} = [draw,thick,inner sep=5,minimum size=10,minimum width=100,font=\sffamily] \tikzstyle{arrow} = ...


2

You can use xlabel style and ylabel style like xlabel style={at={(1,0)},right}, ylabel style={at={(0,1)},above,rotate=-90}, Code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{figure}[H] \centering \begin{tikzpicture} \pgfplotsset{ticks=none} \begin{axis}[ymin=0, ymax=10.5, xmin=0, ...


2

Your own style doesn't change any intrinsic properties of the line width and inner sep settings. So you can still use the regular key setting/reading ways. \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[ every node/.style={line width=2pt}, my line style/.style={very thick}, my node style1/.style={draw,inner sep=1em}, ...



Top 50 recent answers are included