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

learn more… | top users | synonyms

36
votes
11answers
32k views

Best way to generate a nice function graph in LaTeX?

Which is the best way to put function graphs into a LaTeX document?
29
votes
2answers
3k views

What is the clearest way to graph a piecewise function?

I have a function defined as: How can I graph that using functions instead of coordinates? I'm currently working with pgfplots but I'm open to something else if it's better.
11
votes
1answer
11k views

Typesetting a directed, weighted graph with TikZ

I just started doing things with TikZ today and I run into a problem: there is just no example code snippets for typesetting directed, weighted graphs. Can anyone supply one simple example in an ...
10
votes
1answer
587 views

Package for drawing RDF graphs

Is there some package to draw nice RDF graphs, such as the one below (taken from there)? Can such a graph (with the same style) be produced in TikZ?
15
votes
1answer
2k views

TikZ - Two Colored Circle Split

I need to draw a two-colored circle split, exactly as is specified in the section 39.6 of the manual for rectangle splits, meaning that one half of the circle split has one fill color and the other ...
7
votes
2answers
4k views

How to draw Bar & Pie Chart

I'm want to include two graphs mentioned below in a document. I'm able to draw pie charts using pgf-pie. Is there any package which is capable of generating BAR & PIE Chart both? [Also which ...
28
votes
2answers
3k views

Drawing a hypergraph

What is the proper way to draw a hypergraph? Is there a package to do this, or is there an easy way to draw such diagrams with a common drawing method like tikz? I'm trying to draw something like
15
votes
2answers
2k views

Generating dozens of graphs

I am revising old lecture notes on microeconomics and they contain a lot of graphs. As I am rewriting it in LaTeX, I would like to recreate the old graphs, but I need to select the right tool for the ...
14
votes
4answers
6k views

Is it possible to put MS Excel graphs into a LaTeX document?

I will be using Microsoft Excel to produce graphs and I was wondering if there was a simple way to put those graphs into a LaTeX document?
12
votes
2answers
9k views

Basic bar chart with text as x axis labels

I am trying to create a very basic bar chart using pgfplots. I need four bars representing percentages with text as labels under the x axis. Text labels contain spaces and accented, non-English ...
7
votes
3answers
336 views

Numbering nodes in a for loop

I've just started using TikZ to make basic graphs, and I'm trying to reproduce the Petersen graph. I've managed to make it without using for loops, but this obviously isn't a great method for bigger ...
3
votes
1answer
2k views

Graph into graph with arrows

I'm using tikzpicture and I have some graphs, but I want some graphs with arrows. Is there any simple syntax change for that? My Graph: \begin{tikzpicture}[thick] \begin{scope} ...
19
votes
4answers
1k views

How can I display an array (as in the data structure from Computer Science, not the mathematical version) in LaTeX?

I'm finding this extraordinarily difficult to search for, as the mathematical meaning of "array" is much more common in LaTeX documentation. I essentially want a single row of boxes, into which I can ...
8
votes
6answers
589 views

By which pkg to visualize a hypercube graph?

I am trying to visualise hypercube like the below. I have asked help here but getting nodes on top of each other with the packages there. The N-th hypercube has 2^n nodes and each vertex with the ...
11
votes
2answers
539 views

TikZ - Four Colored Circle Split

Following @Alain Matthes's reply on this question, wa can get a picture like this: I am not good enough to adapt the code to split the circle into 4 quarters. Can you help me? ...
5
votes
3answers
961 views

Diagramming workflow in LaTeX

I'm trying to put together some diagrams in LaTeX. My dilemma is as follows. I have a technical report that contains a lot of images from MATLAB. I need to be able to freehand / draw other plots ...
10
votes
3answers
1k views

Drawing a tree of grids

I need to draw a game tree that is similar to the image below. Is there any way to do this using the Tikz package so that the grids can simply be added as nodes?
4
votes
2answers
156 views

Ellipsis positioning when drawing large graphs in Tikz

I tried to use Tikz to draw large graphs with specific toologies and I am running into some problems. Since not all nodes can be represented explicitly, I am forced to use an ellipsis. I tried to ...
4
votes
2answers
3k views

Bar plot labels and grids

\documentclass[a4paper,11pt]{report} \usepackage{tikz} \usepackage{verbatim} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ title = {Optimalization based upon co-occurences}, ...
3
votes
1answer
169 views

I want to create graph with nodes as in the image:

I wrote an example graph with \xymatrix - that's OK. I added circles with &*+[Fo], that's OK too. I added table inside first circle with \begin{tabular} - it is OK. But table needs to be rotated ...
18
votes
3answers
17k views

Drawing graphs in LaTeX

Is it possible to draw graphs like in image below in LaTeX? It doesn't have to look exactly the same. I need arrows with numbers and circles (or dots or other symbol) with text in it (or next to it). ...
18
votes
1answer
505 views

Drawing Tapered Edges in Graph

I'd like to achieve the following effect in a TikZ picture when drawing a straight edge from one node to another. How can I achieve this tapering effect? Notice what happens when an edge exists from ...
22
votes
2answers
541 views

Why does PGF/TikZ 3.0 draw my simple layered graph as non-planar by default?

I have two questions: If I’m reading §30.4 “Crossing Minimization” of the PGF/TikZ 3.0 manual correctly, the layered graph drawing algorithm should have crossing minimization enabled by default. So ...
6
votes
1answer
1k views

How to create a gaussian curve with pgfplot?

What I want: This is what I have so far in terms of code: \newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))} % Gauss function, parameters mu and sigma \begin{tikzpicture} ...
6
votes
2answers
746 views

How to add a single axis label to multiple graphs

Please I need someone to help me address this problem. I have three graphs that I created using excel and I have been able to save them as eps files. I've been able to use the \raisebox command to ...
4
votes
2answers
138 views

drawing two curves in the same figure

Please i need someone who can help me to draw two curves into one figure. I need to draw the two curves Y1 and Y2 in the same figure. By the way, i tried to write the code below: ...
14
votes
1answer
578 views

How to plot integral as summation, as pictured?

I'm new to TikZ and pgfplots but would like to know how to plot the square as well as how to plot the arrows + delta x as well as arrow + delta A: I'd be most grateful if some of you had some ...
12
votes
4answers
2k views

Is there a pure LaTeX or TeX package for chart drawing?

We are creating an easy-to-use LaTeX template for our institution. I'd like to have a pure LaTeX way to create simple bar graphs and pie charts. Does anything exist? I can certainly throw the students ...
5
votes
1answer
273 views

Referencing a Vertex that has Math Typesetting inside it to make an Edge

I want to create math font inside of my vertex circles, AND draw edges between them. How I typically create network graphs is as follows: \usepackage{tkz-graph} \begin{tikzpicture} ...
6
votes
2answers
224 views

Graphs in commutative diagrams in TikZ

I want to draw a diamond shape commutative diagram using tikz. Instead of just letters I want to have simple graphs (just edges and vertices) in the diagram. I tried some stuff but the diagram still ...
5
votes
4answers
391 views

How to plot a curve in a polar form r = f(Θ)?

Can we use LaTeX to make the graph of $\rho = \sec(\theta)$?
5
votes
1answer
420 views

How to draw a graph along with probabilty tables using TikZ package

I need help to draw a Directed Acyclic Graph of Bayesian Network along with probability of each node using TikZ package. Here is an example: Table grid can be a full or partial as in above example. ...
4
votes
3answers
3k views

Bipartite graphs

I want to draw something similar to this in latex. How can I do it? I want it to be a directed graph and want to be able to label the vertices.
3
votes
1answer
169 views

Problems in creating graphs using dataplot

I have four simple databases: db1 dy,volume 2009,120000 2010,160000 2011,400000 2012,650000 2013,1000000 2014,1500000 db2 dy,volume 2009,400000 2010,500000 2011,1600000 2012,2200000 2013,2500000 ...
3
votes
1answer
104 views

qtree items do not have the same baseline

I drew a tree with the qtree package. However, this tree has no consistent baseline. Screenshot: MWE: \documentclass{scrreprt} \usepackage{qtree} \begin{document} \Tree[.table ...
2
votes
1answer
466 views

TikZ - graphs of elementary functions

I would like to ask you if you have something like graphs of elementary functions on one page made in TikZ. I write thesis and I would like to get inspired by your code and design. It would be very ...
1
vote
1answer
398 views

TikZ graph with interesting vertices

I'd like to use TikZ to typeset some graphs like this one: (Sorry for the crappy camera-phone pic) I am familiar with \node, \path and edge, as well as with getting different arrowhead styles. ...
9
votes
1answer
662 views

Use Graphviz within *TeX

I am trying to generate a a graph with dot/graphviz. Is it possible to include it within *TeX and be compiled at *TeX compile time? I've read about TikZ, but it's not the same syntax, is it possible ...
8
votes
1answer
2k views

How do I put loops at an angle in TikZ?

I'm trying to draw a graph in TikZ that has self-loops, and I'd like to be able to specify their position not only as "right" or "above", but something like "above right", i.e. at a 45° angle. How do ...
7
votes
2answers
782 views

Create a command to draw edges in a bipartite graph

In a document I need to insert several bipartite graphs, each one with different number of nodes and edge composition. My idea was to create a command with two arguments: the first one for the ...
6
votes
2answers
742 views

Making Tikz automatic node placement work

I have found some tikz code that uses a development build (past 2.10) and I am trying to get it to work (I sense that I am doing something rather silly). For what is it worth, I confirmed that the ...
6
votes
1answer
286 views

As my exponentials in TikZ plot a parabolic style function, do I install CVS version, and how?

I'm very new to LaTeX. I have read Is plotting exponential graphs a known source of bugs in TikZ? and implemented the code Jake supplied and this fixed the current problem. Thanks Jake :). On this ...
6
votes
3answers
915 views

LaTeX and graphviz: “no room for a new \write”

I'm using TeXShop on Mac OS X (based on LaTeX) in conjunction with the graphvizzz package in order to draw inline directed graphs in my documents (with the use of write18 and the dot command). ...
5
votes
2answers
264 views

Typesetting digraph with weighted edges, varying vertex size, multiple lines in vertex

I would like to draw the graph displayed in the following picture with TikZ and also do some modifications: Firstly I want to carry the labels of the nodes to the inside as a second line. For ...
4
votes
2answers
359 views

Simple directed hypergraphs in TikZ

I'm looking for a simple way in Tikz to draw directed hypergraphs, where the hyperedges are ordered pairs of sets of vertices. For example I would like the hyperedges ({a,b},{c}) and ({c},{a,b}) to be ...
4
votes
1answer
306 views

Could someone help me pgfplots the following functions (w/labels)?

This is an extension of my previous question concerning graphing a pair of functions using pgfplots (please see link below): Could somebody figure out how to create the following graph using pgfplot? ...
3
votes
1answer
384 views

PSTricks---plotstyle LSM (Least Square method)

I am discovering PSTricks's plotstyle=LSM to make a regression analysis y=m x + c. Here is my code: \documentclass[12pt]{article} \usepackage{filecontents} \begin{filecontents*}{data.dat} 0.0 0.0 ...
3
votes
0answers
187 views

Directed hyper-edges in tikz [duplicate]

Possible Duplicate: Arc between arrows in TikZ (automata library) Can anyone tell me if and how I can draw directed hyper-edges in tikz? Specifically, I'm trying to get an edge starting at ...
2
votes
1answer
134 views

Bent paths via relative point from node to node

I'm trying to draw a network flow diagram in tikz, and am having some problems. Here is what I have so far: However I'm having 2 problems with it currently. First of all, for some reason, arrow ...
1
vote
1answer
394 views

Drawing bipartite graph

I want to draw graphs with white and black vertices, such as square-octagon graph. Someone knows the easy way to draw in Latex? Thanks a lot!