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

learn more… | top users | synonyms

6
votes
1answer
668 views

How to grey out edges in a tikz graph?

I'm trying to grey out edges of a graph to high a region of interest. For instance, I would like to make every edge expect for that labeled "interest" grey in the following MWE. \usefonttheme{serif} ...
1
vote
1answer
336 views

pgf stacked bar graph with line plot

I want to draw a stacked bar graph plot with one parameter as a line plot. Here is my code below - \begin{tikzpicture} \pgfplotstableread{Figures/measurements.dat} \datatable ...
4
votes
1answer
934 views

Making chart grids be finer grained

For the MWE below: \documentclass{report} \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{tikz,pgf} \usepackage{pgfplots} \usepackage{slashbox} ...
2
votes
1answer
543 views

Tikz Graph Example – all nodes stacked

I try to reproduce the \graph example of the pgf manual 2.10 page 208: \documentclass{article} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \tikz \graph {a -> { b , c } -> d}; ...
6
votes
1answer
398 views

Drawing a Petersen graph as a voltage graph

I am trying to illustrate a voltage graph construction of the Petersen graph. In practice, this means: The outer cycle will be labelled clockwise (a,0),...,(a,4) with arcs oriented in that order; ...
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 ...
4
votes
2answers
3k views

How to create simple graph in latex

How to create simple graph in latex. x,y axis with straight line drawn at (0,0) at 45 degress through the x,y axis. The graphs here are excellent but just too complicated for newcommers. here is ...
3
votes
2answers
269 views

Numbers as markers with \foreach and additional macro based on counter

First issue I would like to plot several curves using the \foreach command and have their number in the sequence as markers. Here is the code I came up with : \documentclass{article} ...
2
votes
1answer
429 views

How can I position the text within a node of a graph?

I would like to create a visualization of the Bellman-Ford algorithm. To do so, I need to add the information of the weight (number or $\infty$) and the predecessor (letter) into every node. This ...
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.
6
votes
2answers
4k views

How to create a line graph in LaTeX?

I am in need of displaying line graphs in a LaTeX document but I can't figure out how. I searched on Google but did not receive any promising results. Is it really possible to do this within LaTeX or ...
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 ...
6
votes
2answers
3k views

Simple directed graph with some dashed edges

My code here does what I would like, except some node outlines are dashed where they should be solid. I realise I am probably putting the dashed in the wrong place, but I just tried my way to this. ...
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
784 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 ...
1
vote
1answer
269 views

Errors when using dot2texi in MikTeX

I receive errors in log file while trying to compile the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \usepackage{dot2texi} \begin{document} ...
3
votes
3answers
903 views

Drawing a collaboration graph or tree with TikZ

I'm trying to draw a collaboration graph for C data structures. originally I got dot files from Doxygen which I tried to convert using dot2tex with varying degrees of success, though none produced ...
11
votes
3answers
2k views

How to mark a node in a graph with a pattern

I would like to mark my nodes in a graph without using colors because it will be printed in black and white. For example by drawing a vertical line in the first vertex, a horizontal line in the ...
5
votes
2answers
887 views

Dependency graph with TikZ

I would like to make a TikZ diagram to show the detailed dependency structure of the theorems in my thesis with nodes and subnodes. Ex: Theorem 4 (A) coding theorem (A1) ...
6
votes
2answers
4k views

Self loop in an undirected graph using TikZ

How can I create a self loop without a direction on the edge? \path[every node/.style={font=\sffamily\small}] (3) edge[loop] node {$e_{1}$} (3); creates the loop I want but has a direction.
5
votes
1answer
598 views

Can we define a multiedge command using tikz?

I usually need to draw graphs with multiple edges. I would really appreciate if someone can tell me how to write a multiple edge command which will allow me to write one line instead of repeatedly ...
6
votes
2answers
5k views

tikzpicture: How can I draw a loop right-below?

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=4cm, thick,main node/.style={circle,draw,font=\Large\bfseries}] \node[main node] (1) {1}; \node[main ...
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). ...
5
votes
3answers
740 views

What are some good graphing libraries/programs for embedding in LaTeX

The de-facto plotting program for LaTeX is, AFAIA, gnuplot. Is there such a program for drawing graphs/diagrams? I am aware of graphviz and at first glance it appears very useful, but it is missing ...
1
vote
0answers
471 views

Could you represent this sort of network graph, using latex? [closed]

This came up on a rpg.stackexchange question, as an option to represent relations between character with a graph from this PDF where: Every node of this graph is another person who "[who] can do ...
7
votes
2answers
2k views

How to label complex edges with graph library?

I would like to use graph TikZ-library from CVS version (sourceforge or tlcontrib) to draw flowcharts. Something like the one shown in chapter 5 from TikZ manual. In this tutorial, some styles are ...
4
votes
3answers
1k views

WYSIWYG Editor for drawing trees (and export them as vector images)

Is there a good WYSIWYG solution out there for quickly drawing tree-like structures (e.g. in combination with graphviz)? The nodes may contain arbitrary text and should be positioned automatically. I ...
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 ...
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
1answer
3k views

PGFPLOTS: figure and table formatting

Just after an hour spending browsing through the pgfplots manual, I am trying to have a figure and a table side by side (both the figure and the table use the same data). So I still have lot to learn! ...
4
votes
2answers
1k views

Using PSTricks to plot from a data file

I would like to know how to use PSTricks to read and plot data from a text data file e.g. 8 98826 year 2008 9 104925 year 2009 10 140153 year 2010 11 178414 year 2011 And three further ...
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}, ...
5
votes
3answers
967 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 ...
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} ...
5
votes
2answers
1k views

TikZ graph positioning

I am trying to use TikZ to include a simple graph in a short document, but I can't get to position the image properly. Sorry if it is a bit stupid, but this is the first time I am doing something like ...
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 ...
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 ...
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 ...
6
votes
1answer
2k views

Multi-line nodes/annotations in pgfplot

It would be great if I could get the annotation in the graph depicted below on two lines, but I can't seem to figure it out. Presently, I have: \begin{tikzpicture} \begin{axis}[ ...
5
votes
1answer
2k views

Specifying a domain and pgfplots

I'm making a graph with pgfplots with a specific domain, but the graph's domain (both x and y) are not changing. I'm reading through the pgfplots manual and I think I'm doing the right thing except ...
0
votes
1answer
592 views

How to use dot2texi in Lyx

I am trying to use dot2texi package in Lyx to generate graphs, and I include the following in the preamble of the document: \usepackage[all]{xy} \usepackage{dot2texi} \usepackage{tikz} ...
4
votes
1answer
3k views

What are all the options for the “edge” part of the TikZ \path command?

I am drawing edges in a graph using a command like \path (nodeName1) edge [->] (nodeName2) The only way I have learned what options can go into the square brackets after "edge" is by looking at ...
3
votes
2answers
2k views

Size of vertices of a graph in Tikz

I'm trying to produce a graph in Tikz using the Simple style but the vertices won't get smaller than 6pt or so and I'd like them to be much smaller. The code looks like this and if you try it out, the ...
2
votes
1answer
518 views

List of graphs in latex and numbering like Graph 1: , Graph 2:, ect

I am using the trivfloat package to define new environment for graphs. So far so good. I would like to make a list of graphs in the following layout: Graph 1: This is my graph Graph 2: This is my ...
8
votes
1answer
926 views

How to draw a hypergraph (forest)?

How can I draw a hypergraph structure (a.k.a. forest) like this: (Note: This is not a duplicate of this question, of course, since that drawing is very different.)
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 ...
9
votes
1answer
496 views

TikZ picture too tall

I am typesetting the following equation: \documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{equation} f\left( \begin{tikzpicture}[scale=0.5] \tikzstyle{every ...
4
votes
1answer
2k views

How to create Ishikawa (fishbone) diagrams with LaTeX?

Is there an automated way or a "template" to create Ishikawa (also called "fishone") diagrams with LaTeX? They are used e. g. to show the factors influencing a process and have a hiearchical ...
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.
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?