# Tag Info

1


2

For better or for worse, this is currently a feature. From Section 12.2.1 of pgfmanual: At the end of the environment, pgf tries to make a good guess at the size of a bounding box of the graphic and then resizes the picture box such that the box has this size. To “make its guess,” everytime pgf encounters a coordinate, it updates the bounding ...

4

When you use \addplot [...] function {...} it uses gnuplot on the terminal, which uses radians for trigonometric functions, as noted in Section 4.3.5 of the pgfplots manual. To use the pgf computation engine, remove the word function (or replace it with expression): \documentclass{standalone} \usepackage{pgfplots,siunitx} \pgfplotsset{compat=1.11} ...

5

This is an old post, but I think the answers do not underline strongly enough that sometimes, Asymptote cannot be avoided, because of the lack of real 3D support, as indicated by Count Zero. More precisely, if I am not mistaken, tikz-3dplot and other LaTeX packages adds elements as they appear in the code. What if one element should sometimes be in the ...

11

I would suggest to use Lua for all the calculations and also to create the relevant LaTeX code. Of course as Dave suggested use string.format('% .2f','number') to format the number. Two decimal places would be more than adequate for plotting. \documentclass[tikz]{standalone} \usepackage{luacode} \begin{document} \begin{luacode} local function G (x) ...

1

A PSTricks solution: \documentclass{article} \usepackage{pstricks} % parameter \def\point{0.8 } \begin{document} \begin{pspicture}(-4,-2.5)(4,2.5) % ellipse \psellipse(0,0)(2,0.8) \rput(0,-0.1){\shortstack[c]{% \textsc{Automatic Teller}\strut\\[-0.75ex] \textsc{Machine}\strut}} \psset{arrows = ->} % left \psline(-2,0)(-3,0) ...

3

You can plot those circles like \begin{axis}[ axis y line*={right}, axis x line={none}, ymin={1}, ymax={5}, width={8cm}, height={5cm}, ylabel style={xshift=0.60em}, ylabel={units}, ] \addplot[only marks,mark=*,mark size=3pt,green, nodes near coords = \rotatebox{90}{{\pgfmathprintnumber[fixed zerofill, ...

0

Too long for a comment. I do not see an additional "1": \documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections} \usetikzlibrary{positioning} \usepackage{algorithm} \usepackage{algorithmic} \providecommand\progHeader{} \begin{document} \begin{algorithm}[t] \centering \small \resizebox{\linewidth}{!}{ \begin{tikzpicture}[baseline=0] ...

12

If you modify the function to \pgfmathdeclarefunction{G}{1}{% \edef\pgfmathresult{\directlua{tex.print("" .. G(#1))}}% \show\pgfmathresult \edef\pgfmathresult{1}% } then the plot plots the (wrong:-) function without error but you get to see what you were plotting. The first few values are OK but then: > \pgfmathresult=macro: ->-9.5052e-06. ...

1

You can control the postion of legend by at key as in legend style={at={(0.5,1)},anchor=north,draw=none,nodes={inner sep=3pt}}, %% changed here Adjust values in (0.5,1) as you wish. You are missing the comma , as the separator in xticklabels = { \strut Read 0, %% you need comma (,) at the end here and next 2 lines \strut ...

4

This is one possibility where scope environment with shift and rotate options are used to place the small triangles Code \documentclass[border=0.5cm,varwidth]{standalone} \usepackage{xcolor,amsmath,amssymb} \usepackage{tikz} \usetikzlibrary{positioning,calc,intersections} \begin{document} \begin{tikzpicture}[scale=0.8] \begin{scope} \draw[gray,shade, ...

2

You can use \fontsize{50}{60} in font=\fontsize{40}{48}\bfseries, with a scalable font (\selectfont is needed if no \bfseries is used.). With \usepackage{lmodern} you get \documentclass[12pt,ngerman]{scrartcl} \usepackage[left=1cm,right=1cm,top=1.5cm,bottom=0.5cm,a4paper]{geometry} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel} ...

4

The legend image code for ybar legend is defined as (page 212 chapter 4) \pgfplotsset{ /pgfplots/ybar legend/.style={ /pgfplots/legend image code/.code={% \draw[##1,/tikz/.cd,bar width=3pt,yshift=-0.2em,bar shift=0pt] plot coordinates {(0cm,0.8em) (2*\pgfplotbarwidth,0.6em)};}, }, It is nothing but a bar plot with two coordinates, so you get two bars. By ...

1

CW from the comments: Use the mirror key as part of decoration to mirror the decoration along the path. The result here produces an ugly shortened brace, but I'm assuming the actual use case has more content so this problem goes away. \documentclass[french]{beamer} \usepackage{tikz} \usetikzlibrary{fit,calc,positioning,decorations.pathreplacing,matrix} ...

3

Change \pgf@anchor@mux4to1@D0 % to \csname pgf@anchor@mux4to1@D0\endcsname % The code: \documentclass[twoside,a4paper,12pt,headsepline]{scrbook} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[USenglish]{babel} \usepackage{tikz} \usetikzlibrary{positioning,shapes,arrows.meta} \makeatletter % multiplexer shape ...

5

You have, at least, three options: You can use the "angle" anchors for a ņode: \draw [->] (trainingExamples) to [bend right] (learningAlgorithm.170); \draw [->] (hypothesisSet) to [bend left] (learningAlgorithm.190); You can use the calc library and a partway modifier to avoid manual calculations: \draw [->] (trainingExamples) to [bend right] ...

2

I'd recommend a combination of tools: Inkscape svg2tikz Once you install Inkscape, you can put svg2tikz in your ./config/inkscape/extensions directory and restart the program to get this functionality. Now, you just need to convert the bitmap to a vector. Inkscape has this functionality built-in (version 0.48). Step-by-step instructions: Import ...

3

If I understand properly, you may use shadings library and say \shade[lower left=blue, upper right=red] (0.5,0,0) -- (0.5,2,0) -- (0.5,2,-2) -- (0.5,0,-2) -- cycle; I have chosen red just to make it conspicuous. \documentclass[varwidth, border=5pt]{standalone} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{3d,shadings} \begin{document} ...

2

May be you should use native beamer columns instead of minipages. This is just for illustration: \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame} \frametitle{Characteristics of ABCDE} \begin{columns} \column{0.5\linewidth} \begin{itemize} \item AAAAAAA \item BBBBBBBBBB \item CCCCCCCCCC \item DDDDDDDDDDDD \item EEEEEEEEE \end{itemize} ...

3

I've edited and changed your code a little bit. Mainly, a \node was missing around the \includepicture. Is the following what you want to have? \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame} \frametitle{Characteristics of ABCDE} \begin{minipage}{.5\linewidth} \begin{itemize} \item AAAAAAA \item BBBBBBBBBB \item CCCCCCCCCC ...

1

Is it like this? This is obtained with \path [line] (A.220) |- (C); \path [line] (A.140) |- (D); \path [line] (A.310) |- (F); \path [line] (A.50) |- (G); Your full code: \documentclass{article} \usepackage{tikz} \begin{document} \usetikzlibrary{shapes,arrows,calc} % Define block styles \tikzstyle{block} = [rectangle, draw, fill=white, text ...

3

Both of them should be inside the same tikzpicture environment. \documentclass[12pt]{standalone} \usepackage[x11names]{xcolor} \usepackage{tikz} \usepackage{pgfplots,pgfplotstable} \usepgfplotslibrary{polar} \pgfplotstableread{ t u 0 1 20 2 40 3 60 4 100 5 130 4 160 3 180 2 220 2 240 3 260 3 290 3 300 1 320 1 360 1 360 10 360 1 }{\data} ...

3

\documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} \foreach \i in {-2,-1,...,3} \draw (\i,0,-3)--(\i,0,2); \foreach \i in {-3,-2,...,2} \draw (-2,0,\i)--(3,0,\i); \draw[fill=white] (0,1,0)--(0,1,1)--(1,1,1)--(1,1,0)--cycle; \draw[fill=black] (0,0,1)--(1,0,1)--(1,1,1)--(0,1,1)--cycle; \draw[fill=black] ...

2

This is not an answer, but I didn't know how to include \\ inside a comment. I've inserted \\ before \end{TheMatrix} in last example and worked. Why? I've no idea, just luck. \documentclass{article} \usepackage{environ} \usepackage{filecontents} \usepackage{csvsimple} \usepackage{tikz} \begin{filecontents*}{mystuff.csv} mynode;mytext n1;Hello n2;World ...

1

Here is a CSV approach with some trickery. The CSV file is read and its content put inside a macro \BODY. This \BODY is used inside the matrix later. This may not work, if the CSV content contains macros or umlauts since everything is expanded before it is added to \BODY. \documentclass{article} \usepackage{environ} \usepackage{filecontents} ...

2

As suggested by Ignasi, you should use grow'=right instead of grow right. grow', when used, arranges the children in the opposite order. Further, you may like to add some inner separation to all nodes and split long nodes using align=left as I did. I have also adjusted the level distance in the code to adjust the distance between levels. ...

Top 50 recent answers are included