# Tag Info

0

Your zig zag to works well only between points with different x coordinate. You ca define another style, for example zig zig to that works well for points with the same x and use it to define new one to many bis. I have changed one to many by adding access to the parameter of zig zag to. In this way edges don't overlap. Here is the code : ...

2

This is one possible solution. The zig zag to style is set to a default value 0.5 by zig zag to/.default=0.5 further, one to many and the following two styles also use that default value which causes errors. This proposal removes the zig zag to in the one to many style definition, therefore not using \draw (<start>) to (<end>) syntax in ...

1


0

I don't know what you exactly wanted to draw, so I reproduce one of the diagrams from your link, showing how to do it with pst-node and with tike-cd. One of the main differences is that in pstricks you first describe the nodes, then the arrows, while with tikz-cd, nodes and arrows are described simultaneously. The pdf option for the document class is here ...

3

(This builds on Júda's answer, which you should accept, but is a bit too long for a comment.) You can make the diagrams easier to edit in LyX using this dirty hack. After the \usepackage command in the preamble, add this: \renewenvironment{bmatrix}{\begin{ytableau}}{\end{ytableau}} Usually, the bmatrix environment will create a matrix with square ...

5

I’m not familiar with Young tableaux and diagrams, but I think the package ytableau is better and more fully developed than youngtab. In order to use it in LyX you need: Add \usepackage{ytableau} in the preamble (Document → Settings… → LaTeX Preamble (last one)). Wherever you want to add a Young tableau use ERT (LaTeX inside LyX, Ctrl+l shortcut) and add ...

15

And with TikZ: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[double,double distance=1.5mm] (0,0) -- ++(0,-6cm) arc[start angle=210,end angle=330,radius=4cm] -- ++(0,6cm); \end{tikzpicture} \end{document}

9

Here is a Metapost solution that takes a different approach. The shape is drawn as a very thick line and then the inside is erased. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); path s; s = ( (-1,1) -- (-1,-1) {dir -34} .. {dir 34} (1,-1) -- (1,1) ) scaled 1cm; linecap := butt; draw s withpen pencircle scaled 3pt; draw s withpen pencircle ...

6

A PSTricks solution: \documentclass{article} \usepackage{pstricks} \begin{document} \begin{pspicture}(4.46,5) % inner \psline(0.23,5)(0.23,1) \psarc(2.23,3){2.8284}{224.8}{315.2} \psline(4.23,5)(4.23,1) % outer \psline(0,5)(0,0.99) \psarc(2.23,3){3}{221.8}{318.2} \psline(4.46,5)(4.46,0.99) \end{pspicture} \end{document} Notice that ...

6

A tikz solution. Code \documentclass[border=1cm]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \foreach \x/\l in {0/0,1/10,2/20,3/30,4/40,5/50}{ \foreach \y/\ll in {0/Network,1/Disk,2/CPU}{ \draw[->] (-0.5,\y)node[left=2cm, anchor=west]{\ll} -- (6,\y);} \draw[dashed] ...

5

A PSTtricks solution: \documentclass{article} \usepackage{multido,pstricks} \def\timeInterval(#1,#2)#3{% \psline[linewidth = 3pt](!#1 2 add #2 0.57 sub)(!#1 #3 add 2 add #2 0.57 sub)} \def\timeline(#1)#2{% \psline{->}(!1.8 #1 0.57 sub)(!7.7 #1 0.57 sub) \rput[l](!0 #1 0.57 sub){#2}} \begin{document} \begin{pspicture}(8,2.6) % top ...

3

Here's a starter in Metapost, showing you one way to organize a drawing with related sub-elements. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); picture t[], c; z0 = origin; z1 = 55 right rotated -5; z2 = 60 right rotated 60; z3 = 65 right rotated 20; c = image(fill fullcircle scaled 3 withcolor background; draw fullcircle scaled 3;); t1 ...

2

I contacted Thorsten Ohl, the creator of feynMF, and asked him if disconnected diagrams are possible with his package. His honest reply read ... it needs more tricks than I like, but it's possible. In my opinion, his solution looks really good: To reproduce or modify this output, use the following code \documentclass{article} \usepackage{graphicx} ...

4

If you are willing to switch to tikz-cd, you could do like this: % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \tikzset{ symbol/.style={ draw=none, every to/.append style={ edge node={node [sloped, allow upside down, auto=false]{$#1$}}} } } \begin{document} \[ \begin{tikzcd}[row sep= 2ex, column sep=0.8em] H ...

1

You could also draw this sort of plot with Metapost. Compile with mpost and include the .eps file it produces with \includegraphics. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1.44cm; % horizontal unit v = 3.2mm; % vertical unit % axes path xx, yy; xx = (3 left -- 6 right) scaled u; yy = (14 down -- 14 up) scaled v; drawarrow xx ...

2

To obtain the hyperbola you can draw the standard one : x -> 1/x in an appropriate base with center the center of the hyperbola, and vectors on the asymptotes. Here is a solution using pics introduced in TiKz 3.0 : % definition of pic{hyperbola} \tikzset{ pics/hyperbola/.style args={(#1)-<#2>-(#3)[#4]}{ code = { % \draw [ samples=100, ...

2

Here is how you put the ticks down without having to type them in one at a time by hand. \begin{tikzpicture}[scale=2] \draw [-] (0,0)--coordinate(x axis mid)(5.54,0); \draw [-] (0,4)--coordinate(x axis mid)(5.54,4); \draw [-] (0,0)--coordinate(y axis mid)(0,4); \draw [-] (0,0.8)--coordinate(y axis mid)(5.54,0.8) node[left] at (0,0.8) {11}; ...

3

Implicit functions are the weak side of TeX based plotting. You can either call the big brother gnuplot(see pgfplots manual) to save or you can divide the domain of definition and plot separately. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[no ...

0

This doesn't look too complicated. There might even be some examples in the TikZ manual to get you started. Here's how I might go about it: Create \nodes for the rectangles and rounded rectangles. Also for the text in the right column, just with no rectangles. Give them names so you can draw the arrows between them. Use the positioning TikZ library ...

8

Using TikZ, some styles, the positioning, fit and calc libraries. Adjust the settings according to your needs: The code (comments included): \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{positioning,fit,calc} \colorlet{mygreen}{green!80!black} \colorlet{myblue}{blue!80!black} \colorlet{myred}{red!80!black} \begin{document} ...

5

And how easy it is with tikz? Here is how: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{block/.style={draw,minimum width=2.1cm,minimum height=2.1cm,text width=2.1cm,font=\raggedright}, line/.style = {draw,thick, shorten >=3mm,shorten <= 3mm} } \begin{document} \begin{tikzpicture} \node ...

3

Tikz would work well, you can see examples such as this one that show how to create boxes and text. If I didn't have finals in six hours I'd draw your example diagram! The basic structure in Tikz (for this kind of diagram at least) is to allow you to create named nodes, create a shape around them (by passing parameters to the node itself) and then you can ...

2

Without tikz-cd \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[node distance=1cm,>=latex] \node[draw] (X) {X}; \node[draw, right=of X] (M) {M}; \node[draw, right=of M] (Y) {Y}; \node[draw, above=of M, fill=yellow!30] (W) {W}; \draw[->] (X)--(M) coordinate[midway] (aux){}; \draw[->] ...

3

Try this: \documentclass[10pt,a4paper]{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} & W \\ & M \arrow{dr} \\ X \arrow[ur, ""{name=Z}]{} \arrow{rr} & & Y \arrow[from=1-2, to=Z, bend right] \end{tikzcd} \end{document} Output:

3

One possibility using the name key and then using those names to draw the arrows: The code: \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} & A \\ B\arrow[r,""{name=B}] & C\arrow[r,""{name=C}] & D \arrow[from=1-2,to=B]\arrow[from=1-2,to=C] \end{tikzcd} \begin{tikzcd} & W \\ & M ...

4

This is a starting point. zz arrow style is defined in zz whose zigzag form is borrowed from decoration. positioning are used for node allocations where the syntax below = <distance> of reference point are used. calc is used to do coordinate calculation as displayed in ($(...)+(...)$). Code \documentclass[border=10pt]{standalone} ...

1

Actually, if all you want is a box for an answer, I'd say tikz might actually be the most readable (syntactically, at least) way to do this. A box as wide as the text, 1in tall, is just: \tikz \draw (0,0) rectangle (\linewidth, 1in); The point (0,0) just references the current position in the text, then \linewidth gives it the right width (which ...

2

This command draws a box filling the linewidth (you could adjust that, of course), and allowing you to specify how tall the box is. It creates a box of specified height using \raisebox and then draws lines around it and specifies the width using \framebox. It uses an optional argument, so \answerbox defaults to a height of 3\baselineskip, but you can ...

3

You could just do something simple like this \documentclass{article} \newcommand\answerbox{%% \fbox{\rule{1in}{0pt}\rule[-0.5ex]{0pt}{4ex}}} \pagestyle{empty} \begin{document} Put you answer here: \answerbox \end{document} which requires no use of TikZ.

5

Nothing fancy with tikz. It is easy (this answer is for just showing it). \documentclass{article} \usepackage{tikz} \begin{document} Your answer: \tikz[baseline=0.6ex]\draw (0,0) rectangle (10cm,3ex); Your answer: \tikz[baseline=-4pt]\node[draw,minimum width=10cm,minimum height=3ex] {}; \end{document}

2

If I understand properly, you may want remove these lines \usepackage[active,tightpage]{preview} % For flowchart and Diagram \PreviewEnvironment{tikzpicture} % For flowchart and Diagram \setlength\PreviewBorder{60pt}% to control size of the diagram, to reduce increase +ve value These lines are meant to produce a tight picture, not to be used in a ...

2

I still don't know why they teach root locus still in 2014 but they are skipping the actual engineering part that is using the spirule which made the Root Locus method useful in the first place. Otherwise it was as computationally demanding as other methods. But nevermind. Consider the following snippet a = rss(5); % Stable system with 5 eigs e = ...

0

I will try to post in more detail when I can, but I can give you direction for now. LaTeX + matplotlib is one of the best ways to get publication quality plots from data, since matplotlib plots can be saved as pgf code. I'll find out for sure, but I think it's scipy.signal that has some code for doing the basic things you need for a root locus (and other ...

Top 50 recent answers are included