New answers tagged

0

You can use arrows.meta library and looseness key to control the distance from the control point to the two end points as said in the pgfmanual. \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{arrows.meta} \usepackage[tightpage,active]{preview} \PreviewEnvironment{tikzpicture} \begin{document} \begin{center} \begin{tikzpicture} \node (a) at (0,0) ...


1

Here is the same answer as Rmano's one, but in Lualatex with everything in the same file: \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \usepackage{pgf} \usepackage{luacode} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[xlabel=p1, ylabel=p1t, zlabel=p2t, tick style={draw=none}, xmin=-300, ...


3

Using the animate package: \documentclass{standalone} \usepackage{animate} \usepackage{tikz, pgfplots} \usetikzlibrary{arrows} \let\Oldvec\vec \renewcommand{\vec}[1]{\ensuremath{\mathbf{#1}}} \begin{document} \begin{animateinline}[controls]{8} \multiframe{21}{rYa=-4+-0.03,rYb=4+-0.03}{ \begin{tikzpicture}[line cap=round,line join=round,>=triangle ...


1

The result is not very nice, but you can try with a TiKZ matrix. Be careful, a matrix doesn't behave like a tabular, so drawing vertical and horizontal divisions is not so easy. \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning,matrix, decorations.pathmorphing} \begin{document} \begin{tikzpicture}[decoration={random steps, segment ...


3

For fun, here is a solution in ConTeXt. The solution relies on my wrapper around the drops module by Peter Rolf. The drops module uses imagemagic to draw the shadow (which looks more realistic than the tikz-style shadows) \usemodule[dropshadow] \setupexternalfigures[location={local,global,default}] \definedropshadow [polaroid] [flatdark] [...


2

I think there are some missunderstandings. Please see the following changed code. I used package showframe to visualize the resulting typing area, package blindtext to create some dummy text and command \fbox{...} to visualize the resulting subfigure. To get a left justified first subfigure and a right justified second subfigure I added command \hfill ...


2

I do not have your data, so I just made up some numbers which is nowhere near what you have, but it illustrates the point. This answers is stolen from Dr. Manuel Kuehner's pgfplots, plot options ignored when using “restrict expr to domain”. Output Code \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{filecontents} \begin{...


1

and one more TikZ solution: \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{arrows.meta,calc,positioning} \begin{document} \begin{tikzpicture} \coordinate[label=left:$O$] (O); \coordinate[above=50mm of O, label= left:$L$] (L); \coordinate[right=50mm of O, label=right:$T$] (T); % \draw[thick](O) -- node[left] {$H$} (L) ...


1

You can arbitrarily change the line width of the line by adding this to the options, like so: \draw[->, line width=1mm] (0,0) -- (1,0); You can use any measurement system like points (pt), metric (cm, mm), inches (in) and so on.


2

To fill the background of the ticklabels you can use ticklabel style={fill=white}. But the are drawn before the plots ... To change this order you can define and use a new layer set. \pgfplotsset{ standard/.style={ axis x line=middle, axis y line=left, ticklabel style={fill=white}, set layers=tick labels on top% use ...


3

Add xticklabel style = {fill=white}and set layers = axis on topto your axis : \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \pgfplotsset{ standard/.style={ axis x line=middle, axis y line=left, fill = blue } } \begin{tikzpicture}[] \begin{axis}[standard, domain=0:2,...


0

Could you check whether this helps: \begin{tikzpicture}[] \begin{axis}[standard, domain=0:2, xtick={1}, % xticklabels={label}, ] \addplot[blue] coordinates { (0,-1) (1,-1) (1,1) (2,1) }; \node[fill=white] at (axis ...


1

Sort of does it. Possibly not ideal though. Uses a to path: \documentclass[tikz,border=5]{standalone} \usetikzlibrary{shapes.geometric,arrows.meta} \tikzset{ connector/.tip={Circle[width=0.1cm,length=0.1cm]}, every D/.style={ semicircle, draw, minimum width=0.375cm, fill=white, rotate=90, inner sep=0, }, *D*/.style={ connector-connector, ...


5

I made two pic's for the different connection types (element A and element B) which are positioned at the cross points of the lines: \documentclass{article} \usepackage{tikz} \begin{document} \tikzset{ element A/.pic={ \begin{scope}[rotate=45,shift={(180:0.5cm)}] \draw[thick] (0,-0.5) -- (0,0.5); \fill (0,-0.5) circle [radius=1mm] (0,0.5) ...


1

My solution uses a semicircle shape for each cell which are distributed with a matrix of nodes. Once semicircles are created, a foreach loop is used to add input connections and creates input nodes which will be later used for horizontal lines drawing. Outputs are drawn in a similar way, a foreach loop where all connected cells are referenced. Finally, ...


2

See if this solution is acceptable for you: \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{plotmarks} \begin{document} \begin{tikzpicture} \draw [->] (0,0) -- (4,0) node[right=-1.5pt] {\pgfuseplotmark{*}}; \end{tikzpicture} \end{document} I don't know your intention, but anyway, see, if arrows.meta library can offer an solution (...


4

A starting point : \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \def\radius{.5cm} \begin{document} \begin{tikzpicture} \coordinate (a) at (0,0); \coordinate (b) at (3,-1); \coordinate (c) at (2,2); \foreach \nd in {a, b, c} {\draw (\nd) circle (\radius);} \draw ($(a)!\radius!-90:(b)$) -- ($(b)!\radius!90:(a)$) ($(b)!\radius!-90:(c)$) -- ...


2

I'll complete samcarter's answer with a couple modifications I added: I moved the code to a function, and I darkened the shadow. Function: \tikzset{ text shadow/.code args={[#1]#2at#3(#4,#5)#6}{ \pgfkeysalso{/tikz/.cd,#1} \foreach \x in {0,10,...,40}{% \node[#1, xshift=\x*-0.001cm, yshift=\x*0.001cm] at (#4,#5){% ...


2

Another verbose solution: \documentclass[border = 2cm]{standalone} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{arrows.meta,positioning, shapes} \begin{document} \begin{tikzpicture}[node distance = 2.5 cm, block/.style = { rectangle,draw, rounded corners, text width = 4 cm, minimum height = 2cm, align = center}, arrow/.style = {-{Triangle[]},...


3

You can increase the link bulge factor with e.g. \ganttlinkedbar[link bulge=4]{C}{2016-08-05}{2016-08-25}. The default value is 0.4. \documentclass[tikz]{standalone} \usepackage{pgfgantt} \begin{document} \begin{ganttchart}[ y unit chart = 0.65cm, y unit title = 0.75cm, x unit=0.5mm, time slot format=isodate, ]{2016-05-01}{2016-12-31} ...


1

Is this what you want? \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture}[scale=2] \begin{axis} \addplot+[only marks] file[x index=0, y index=1]{baba.txt}; \end{axis} \end{tikzpicture} \end{document}


2

You could place all your images in a tikzpicture, but you will need to compile twice to get correct placement. You can then place your text inside a minipage instead of dealing with a table. \documentclass{report} \usepackage{lipsum} \usepackage{geometry} \usepackage{mwe} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{...


1

Just raise every arrow. Once finished, tikzpictures are aligned on its baseline. In this case, tikzpicture dimensions are 1cm long and almost nothing high. Coordinates (-1,2) and (0,2) only have sense inside the tikzpicture, but once finished only picture size matters. Therefore vertical position 2 means nothing in this case. But you can use a \raisebox ...


2

If the color pattern is given by a mathematical function, you might want to plot it using the pgfplots colormap. \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[view={0}{90}] \addplot3[surf] {exp(-((x)^2+(y)^2))}; \end{axis} \end{tikzpicture} \end{document}


0

I had to disable your header-image here, as I don't have it, but it doesn't have anything to do with the solution anyway. When using \\ in a tabular-environment, it works a lot different, as TeX is in vertical-mode, not in horizontal mode. Basically, it means that what you define in one cell, is not carried over, even though you put curlybraces around it, ...


2

An example with TiKZ and a colorseries from xcolor. \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{calc} \begin{document} \pgfmathsetseed{1} \begin{tikzpicture} \definecolorseries{test}{rgb}{step}[rgb]{.95,.85,.55}{.17,.47,.37} \resetcolorseries[35]{test} \foreach \x in {0,1,...,4}{ \foreach \y in {0,1,...,7} \fill[test!!+] (\x,\y) ...


0

\documentclass[tikz]{standalone} \usetikzlibrary{shapes} \newlength{\tempw} \newlength{\temph} \newcommand{\minarea}[2][\empty]{% #1 = draw keywords (optional), #2 = node name \pgfextractx{\tempw}{\pgfpointdiff{\pgfpointanchor{#2}{west}}{\pgfpointanchor{#2}{east}}}% \pgfextracty{\temph}{\pgfpointdiff{\pgfpointanchor{#2}{south}}{\pgfpointanchor{#2}{north}...


2

An alternative to @Amit nice answer. Main differences are: instead tikzstyle, \tikzset is used all coordinates are relative to the first node Complete code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows, calc, positioning} \tikzset{ box/.style = {draw, text centered, outer sep=1mm}, intt/.style = {box, text width=9cm, minimum ...


0

Here's my suggested simple smart diagram. \documentclass{standalone} \usepackage{smartdiagram} \begin{document} \smartdiagram[circular diagram]{Blah, Blah, Blah} \end{document} If you don't want arrows add this just before the \smartdiagram line. \smartdiagramset{arrow style=-} to get this: For more customization, have a look at the manual.


2

Not the best way, but one way is by specifying the coordinates of the nodes -- \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,calc,positioning,shapes.geometric} \tikzstyle{intt}=[draw,text centered,minimum size=5em,text width=9cm,text height=0.34cm] \tikzstyle{intl}=[draw,text centered,minimum size=2em,text width=2.75cm,text height=0.34cm] ...


1

Using option remember picture for your original pictures, and options overlay, remember picture for the picture with whatever lines you need to draw, should do the trick (but be aware that a name clash could occur if identically named nodes exist in both pictures; furthermore, a picture with option overlay doesn't reserve any space in the page): \...


2

If this is meant to be just one diagram, then you don't need to split it in two tikzpicture environments. Just place the mindmap in a scope environment with the same options as the existing tikzpicture, but adding something like xshift=20cm,yshift=-5cm. I defined a coordinate at the end, after said scope environment, and drew some arrows from that point. ...


5

A quick hack would be to write the title a second time, a bit offset and in a darker colour. The following example uses a mixture of the background colour and black \color{black!20!green-abs} and is a bit darker than the shadow shown in your example, but this can be adjusted to fir your needs. \setbeamertemplate{frametitle}{ \begin{beamercolorbox}[wd=\...


4

You can use \pgfdecoratedinputsegmentlength: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \tikzset{ dotted part of curve/.style args={between #1 and #2 with color #3}{ postaction={decorate,draw,#3, decoration={ markings, mark=between positions 0 and 1 step 3*\pgflinewidth with{\...


3

For a single Bézier curve the basic layer \pgfpathcurvebetweentime command may be useful and certainly much more efficient than a decoration. Unfortunately, there is no TikZ interface by default, but a somewhat crude (although serviceable) approach is shown below: \documentclass[tikz,border=5]{standalone} \tikzset{part curve/.style args={% from #1 to #2 ...


1

This shows how to put a 1 column legend on the right. It occurred to me that your legend comes from one plot instead of combining entries from multiple plots, which simplifies matters. \documentclass[margin=5mm]{standalone} \usepackage{pgfplots} \usetikzlibrary{matrix} \usepgfplotslibrary{groupplots} \pgfplotsset{compat=newest} \begin{document} \begin{...


3

Not exactly the image in the question - but pretty close. Their wool needs to be combed out to straighten it a bit, but they're all in the right places. Just in need of a bit of a trim, really. \documentclass[tikz,border=10pt,multi]{standalone} \usetikzlibrary{shapes.symbols,shapes.callouts,backgrounds,shadows} \begin{document} \begin{tikzpicture} [ ...


2

I struggled to get three different colours for each "stack" so decided to post the solution, working off of AboAmmar and Maarten. Note, this produces a grid 24x24x3 \documentclass[border=2mm]{standalone} \usepackage{tikz} \newcommand{\drawbox}[4]{ \pgfmathsetmacro \angle {30} \pgfmathsetmacro \xd {{2/3*cos(\angle)}} \pgfmathsetmacro \yd {{2/3*sin(\angle)}} ...


4

This is an annotated version of a Minimal Working Example based on a corrected version of the code posted in the question. Colours are used to indicate which elements of the existing diagram are associated with particular labels. Blue, red and green show labels added to the three nodes as part of the \node operation. Orange, magenta and cyan-blue show ...


3

Please post a M[W]E next time. Here is an illustration of how to place nodes close to existing nodes or lines : \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{center} \tikz { \node[draw, rounded rectangle] (a) at (0,2) {Sales Response}; \node[draw, rounded rectangle] (b) at (5,2) {Optimal Labor}; \node[draw, ...


4

You should use a dimension for shorten: \draw[shorten >=-2pt] (0,1) -- (3,5); Then you can use calc to find the same point with ($(3,5)!-2pt!(0,1)$). See: \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta,positioning,calc} \begin{document} \begin{tikzpicture}[] \draw[thin, gray] (0,0) grid (5,5); \...


3

A PSTricks solution: \documentclass{article} \usepackage{pstricks} \begin{document} \begin{pspicture}(7,6) \psset{ dimen = m, fillstyle = solid, fillcolor = blue!60, framearc = 0.2 } \pspolygon(0.7,1.5)(2.8,4.5)(3.4,4.5)(1.3,1.5) \pspolygon(6.3,1.5)(5.7,1.5)(3.6,4.5)(4.2,4.5) \pspolygon(2,0.5)(2,1)(5,1)(5,0.5) \psframe[...


0

Well, after looking on this and other references, I think, it is too difficult for me than needed. So, I fixed it by using arrow and rectangle... \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows,shapes.geometric,positioning,patterns,arrows.meta} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture}[ ...


3

All frames must share the same, manually inserted bounding box (in 2D screen coordinates) in order to override the automatic, TikZ-computed ones (which may differ from frame to frame). For parameterized pictures within the animateinline environment, the \multiframe command is to be preferred over \whiledo: \documentclass{article} \usepackage{tikz} \...


2

It should be at start rather than start: \documentclass[tikz,border=10pt,multi]{standalone} \usepackage{tikz-3dplot} \begin{document} \tdplotsetmaincoords{70}{115} \begin{tikzpicture}[tdplot_main_coords] \def\laxis{7} \def\xtriangle{3} \def\ytriangle{4} \def\ztriangle{5} \def\ltick{.2} %%% axes \draw [->] (0,0,0) -- (\laxis,0,0) node [...


7

I would use a split approach, really -- I am posting this here because I am sure that someone with LUA skills will integrate it in a standalone LaTeX source. It happens I know python... and I will learn from the other answer :-) So I created this quick and dirty python script to find the intercepts, by linear interpolation: #! /usr/bin/env python3 # # ...


4

You could do this simply by adding the line \setlength{\abovedisplayskip}{0pt}to your code, which controls the space above equations which are in display-mode (as in not textmode) Output Code \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \pgfplotsset{compat=1.13} \usepackage{...


1

Based on the solution given by jlv, \begin{scope} \clip (12.61,-1.01) rectangle (12.97,-.888) ; \fill[ opacity=.4,color=blue] (12.61,-1.01) ..controls +( .46,.05) and +( .135,-.0811 ) .. (12.839,-.81) -- (12.88,-.75) .. controls +( .1,-.0811 ) and +( .4,.083) .. (12.68,-.96); \end{scope} \begin{scope} \clip (12....


3

This is not a complete answer, but will hopefully get you going in the right direction. If I understand it correctly, this question is a difficult one, since you are essentially trying to find the "maximum" point of a bent curve so that you can fill up the space to that point. The naive solution is to use \fill with the same path coordinates you have, ...


1

It is a bit misleading to say pic actions are limited. Of course, they are limited, just like everything else. A hammer is limited: it can't boil water. I think the problem is that you are trying to make them do something they are not designed for and, possibly, trying to use pics for something they weren't designed for. pics are easy to create but, as is ...



Top 50 recent answers are included