Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [graphs]

Graphs are (1) graphs of functions or (2) sets of nodes and edges.

2
votes
1answer
51 views

Duplicate and overlapping edge labels in tikz graph

on the following graph (using the new Tikz syntax), I have 2 edges with different labels pointing towards the same node. But one of the edge have both labels overlapping ! Here is a minimal example (...
2
votes
3answers
87 views

Tick Marks in Geometry

Here is an excerpt from my code: \begin{tikzpicture}[scale=5.5] \coordinate[label=left:$A$] (A) at (0,0); \coordinate[label=right:$B$] (B) at (1,0); \coordinate[label=:$C$] (C) at (0.5,...
1
vote
3answers
145 views

Creating graph for an absorbing markov chain

I have the problem to create the following graph It should have the following style The code is given by \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb} \...
1
vote
2answers
75 views

problem with creating a graph using tikz

I have a little problem. I have create with latex a graph. Here is my code \[ \begin{tikzpicture}[->,>=stealth,shorten >=1pt,auto,node distance=2.5cm, semithick] \...
4
votes
3answers
615 views

plotting a linear programming problem

I am a beginner in latex , but I am learning as I go, I want to plot the following linear programing problem: (plot : to make a graphic) f(x,y) = 2x - 3y -> max x + y <= 12 x,y >=0 here ...
5
votes
1answer
56 views

Comparison line chart

I want to produce a comparison graph chart like this: I have found information about bar graphs, but not about line comparison graphs as I am trying to do. Any help?. Thanks.
5
votes
3answers
129 views

How to create a vertex at the intersection of two edges with tkz-graph?

I want to draw But I don't know how to create v_6 which is the intersection of \Edge(v_3)(v_5) & \Edge(v_1)(v_4) and v_7 is the intersection of \Edge(v_3)(v_5) & \Edge(v_2)(v_4). Here the ...
1
vote
1answer
43 views

How can I add a fixed point to a line of best fit? [duplicate]

I am using y = {create col/linear regression={y=data}} with addplot to generate a line of best fit from data I'm pulling in from a file. How can I force the line to include the origin as a point it ...
1
vote
1answer
63 views

Creating a graph for a markov chain

I have the following problem. I want to create the following graph So far I know how to create a graph with latex. But I don't know how to insert the series points. Here is my solution. It looks ...
2
votes
1answer
33 views

Gnuplot+LaTeX: two figures side and y-label far away

I read most of answer to similar questions, but they did not help me. I have two problems: these are two graphics that I am trying to place side by side. But: firstly, they turn out to be shifted ...
1
vote
1answer
38 views

Notation for flag algebras in graph theory

I am reading some papers regarding flag algebras, in particular this one. It can be seen that there are nice graphical representations of simple graphs such as triangles and squares, e.g. on the ...
1
vote
1answer
55 views

Adjusting TikZ Figure

I use following script (see also here) below, to draw this figure: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{tikz} \usetikzlibrary{positioning} \begin{...
1
vote
2answers
76 views

How do I plot an ellipse with \addplot with using an equation

i am trying to plot an ellipse in my coordinate system. TikZ provides an implemented easy method for plotting ellipses, but I don't like it — I want to draw my ellipses with actual analytic equations. ...
3
votes
2answers
30 views

Axis environment problem: how to determine a domain in which x and y axes are to be drawn?

Let's suppose that I want to put a neat graph of the sinus function in my document. Its source code is: \documentclass{standalone} \usepackage{pgfplots} \usepackage{tikz} \usetikzlibrary{calc} \...
4
votes
1answer
63 views

Customized node of graph in tikz

I found the following picture of snowflakes: \begin{tikzpicture}[decoration=Koch snowflake] \draw decorate{decorate{decorate{decorate{(0,0) -- (3,0)}}}}; \draw decorate{decorate{decorate{...
2
votes
1answer
83 views

Strange white outline around vertices in graphs made by TikZ [closed]

In Metapost I was able to make a graph where there's no gap between the edges and vertices: But in Tikz there is a gap between the two: Making a black "border" around the vertex did not help. No ...
5
votes
2answers
171 views

Recreating Peterson graph with tkz graph?

I was trying to recreate Here is my MWE \documentclass{standalone} \usepackage{tkz-graph} \usepackage{tkz-berge} \definecolor{iceberg}{rgb}{0.44, 0.65, 0.82} \tikzstyle{VertexStyle} = [shape = ...
5
votes
3answers
99 views

Colorize sides regular polygon

To illustrate what edge-coloring is, I'd like to colorize a regular polygon. I want to generate the shape using TikZ, then colorize the sides (edges) of the polygon separately, for instance by doing ...
2
votes
2answers
53 views

visually distinguish right and left children

I'm using the qtree package to render small inline trees in my document. The tree nodes in my case are limited to 0 or 2 child nodes. I'd like to visually distinguish the right and left branches ...
1
vote
1answer
26 views

How to typeset path from vertex to vertex in math mode?

I'd like to typeset a path from a vertex to another vertex similar to this: The examples I've found either use TikZ or does not look right. Is there a way to typeset a path identically to how it's ...
0
votes
0answers
32 views

Intricate graphs and diagrams you have made before

My motivation for this question is to get some examples that I can refer to in the future for economic diagrams I'll be making, but I'm looking for any subjects to submit since the graph template is ...
5
votes
1answer
55 views

TikZ - Edges not positioned properly when using \foreach loop

I want to draw a graph like this: Which I can do well enough with the following code: \node[circle,draw] (v) at (0,0) {$v$}; \foreach \i in {1,...,6}{ \node[circle,draw] (u_\i) at (180 - 360/6 * ...
2
votes
4answers
193 views

How can I make a curved graph in Tikz and vertical lines from the x-axis to that graph?

I am basically trying to make this figure in Tikz only better, but I can't figure out how to make the vertical lines from the x-axis to the graphs M(x). The function is M(x)=−1/2·q·x^2+1/2·q·L·x, ...
2
votes
1answer
35 views

How to fix a slanted axis in Tikz

I have attempted to create a limacon with the equation r= 0.5 + cos(theta). \begin{document} \begin{figure}[h!] \centering \begin{tikzpicture} [xscale=3, yscale=3, domain=0:2*pi] \...
2
votes
1answer
39 views

Tikz graph with citations

I am trying to create a graph whose nodes are some author-year citation from the bibliography. This question is very similar to this post but, unfortunately, the answers provided suggest using the ...
3
votes
2answers
101 views

I'm trying to graph a rational function in tikz [duplicate]

I'm attempting to graph the function y=[(x-2)(x+2)]/[(x-3)(x+3)]. However, I get bizarre output, which consists of straight lines. Any idea what's wrong? Thanks! \documentclass{article} \...
2
votes
1answer
63 views

How do I graph $f(x)=x\cdot \sin \frac{1}{x}$?

I am trying to use the following thread, but whatever changes that I make lead to either an error or just a regular line being formed instead of the graph: How to plot the function f(x) = sin(1/x) ...
1
vote
0answers
25 views

TikZ graphdrawing library in ConTeXt throws error [duplicate]

Consider the following example: \usemodule[tikz] \usetikzlibrary[graphs,graphdrawing] \starttext \starttikzpicture \graph { A -> B }; \stoptikzpicture \stoptext While it works in ...
6
votes
1answer
143 views

Drawing Hypergraph using TikZ

I want to draw a Hypergraph using TikZ that looks like this What I have so far: \usepackage{tikz} \usetikzlibrary{calc, positioning, fit, shapes.misc} \begin{document} \begin{tikzpicture} [ he/....
1
vote
1answer
83 views

How can I rotate this rectangle 90 degrees?

How are members of the page. I'm trying to make this homotopy diagram. I'm trying to rotate the rectangle that appears in the image 90 degrees. How could I do this in the code. Thank you. This is the ...
1
vote
1answer
79 views

How can I do these contour graphs using TikZ?

It would be very helpful for me if you could help me create these images with TikZ. With this I could make more than I have. Thank you
1
vote
1answer
63 views

How can I make this type of contour diagrams using tikz?

Good Morning. At the moment I am new in the topic of creating graphics in latex. I know how to handle the editor on average, but I'm just getting started on this topic, especially contour graphics. I ...
5
votes
2answers
238 views

Positioning of a tikz picture

I have two tikz pictures in a figure. Here is the code: \begin{figure}[H] \begin{tikzpicture} \draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$] {} --...
0
votes
1answer
102 views

Drawing multiple graphs side by side in Tikz

I'd like to make a picture of a triangle, a square, and a pentagon (C_3, C_4, C_5 in standard graph theory vocabulary) appearing side by side in Tikz. Drawing them individually I can do but I'm not ...
1
vote
2answers
75 views

Graph like figure with citations using Tikz

I would like to create a graph like figure (shown in the image) with text and citations related to text. I manually created the image shown, but I would like to use Tikz (or anything else) to create ...
1
vote
1answer
30 views

How to add a vertex vertically in this template (or with tkz-graph )

Please help me draw a graph like this(see hand-drawing pic) in Latex ? I have found a template which has clean Latex in it. I am trying to add some vertices vertically without any success, Here is ...
0
votes
1answer
41 views

Displacement vs Time graph

I want to draw a displacement vs time graph of two runners running around a circle track of unit length so that it looks like the picture below in which one runner is running at speed 1 and another at ...
12
votes
2answers
359 views

Can someone help me draw this?

Been trying to write the code for this but have been unsuccessful so far and I am on out of time to try to make it work. Stuff I had written till now. \documentclass{article} \usepackage{tikz} ...
1
vote
1answer
56 views

Plotting logarithm with base b in TikZ

\begin{tikzpicture}[line cap=round,,x=1.3cm,y=0.4cm] \clip(-1,-3) rectangle (12,13); \draw [domain=0.1:10 ,smooth,very thick] plot(\x, \Log{2}{3*\x}); \draw[->,color=black,line width = 0.8pt] (0,0....
2
votes
1answer
45 views

Placing Nodes Around a Circle

I want to draw e.g. 9,13,17 nodes, evenly, around a circle in TikZ. How do I do this? Then I also want to be able to edit easily the edges between the different nodes (to represent different graphs ...
4
votes
1answer
156 views

How to create interactive 3D graph using latex

About two years ago, I saw an interactive 3D graph online in this forum made by latex maybe using pgfplots. Basically, a user could use mouse to drag (or slide through) the pdf graph to change the ...
2
votes
1answer
55 views

Is it possible to make an X,Y,Z scatter plot in LaTex?

I need to make a scatter plot with the following points: $(1,1,0), (-2,0,2)$, and $(2,1,1)$ and then I need to draw a plane through the three points. I don't really know much about creating graphs in ...
0
votes
1answer
59 views

Naming a Graph (Graph Theory)

\begin{tikzpicture} [acteur/.style={circle, fill=black,thick, inner sep=4pt, minimum size=0.2cm}] \node (A) at (5,12) [acteur][label=right:0]{}; \node (B) at (8,11) [acteur][label=right:1]{}; \node (C)...
5
votes
1answer
129 views

Position a \graph in tikz

Shouldn't the following \graph {a} be positioned at node middle? \documentclass{article} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \begin{tikzpicture} \draw[help lines] (0,0) ...
4
votes
2answers
88 views

Draw a picture by Tikz

I am trying to draw a picture of function look like this: Not sure how to start it. Can anyone help me on this picture?
1
vote
1answer
24 views

Trouble drawing graph (again)

So, my dear latex editor is making me crazy. He does not want to compile: \begin{tikzcd} F \arrow{r}{\Gamma_F} \arrow{d}{\alpha} & Sh(F)|_B \arrow{d}{\beta_B}\\ G|_B \arrow{r}{=} G|_B \end{...
0
votes
0answers
28 views

How to draw tree scheme? [duplicate]

I am writing the report for my lesson with the details like that. I would like to draw by tikz or anything else? I really have no idea. I've taken a look but I didn't find out anything that could ...
0
votes
0answers
25 views

trouble with drawing graph

So, I am using \usepackage{tikz-cd} and here is my code which causes arrows during compilation. \documentclass[border=5pt]{standalone} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} ...
2
votes
1answer
44 views

Conditionals at the top of a tikz subgraph?

I want to use a conditional in graph with Tikz (awesome package by the way). My solution is to repeat the node with 2 different labels : "Urgent ?" -> ["yes"] "do something"; "Urgent ?" ->["no"]...
7
votes
1answer
159 views

Include accolade in bipartite graph to group nodes together

I want to include accolades in my bipartite graph to show that nodes belong to a certain group. With the code below I created the following bipartite graph: \begin{figure}[H] \centering \definecolor{...