# Tagged Questions

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

6k 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.
18k 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 ...
13k 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 ...
2k views

### How to plot a graph from its adjacency matrix and coordinates of vertices?

A similar question is here. If we give all the data of the vertices's coordinates and the graph's adjacency matrix, how to plot it with tikz, pstrick or other tool in tex? here are the data of ...
6k 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.
4k 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 ...
8k views

### How do I develop a complex time line?

I currently have a resume I've made in Illustrator with a time line of my work with academics on the lower part and jobs on the upper section: The trouble with it being in Illustrator of course, is ...
2k 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?
4k 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
4k 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 ...
3k 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} \begin{...
23k 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?
2k 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 ...
1k 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 ...
15k 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 ...
872 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 ...
6k 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} \...
40k 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).
2k views

### How can I produce the history graph of a Git repository in LaTeX?

Is there a relatively simple way to produce the history graph of a git repository in LaTeX? I'm looking for something nicer-looking than the verbatim output of git log --graph --oneline
3k 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 ...
2k views

### Which LaTeX package is needed to draw radar-like diagrams?

Can you please suggest some LaTeX package of drawing charts in the format mentioned below? It should offer the possibility to put text as "Text A" as well as "Text B" . Note: Currently I'm using ...
6k views

### How do I change the aspect ratio of gnuplot output?

How do I change the aspect ratio of the canvas of a gnuplot plot in LaTeX using the gnuplottex package? The following changes the aspect ratio of the output but not the canvas size, thus leaving a ...
1k 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? \documentclass[11pt]{...
709 views

### How to plot a graph from its adjacency matrix (coordinates manually specified)? [duplicate]

For example, I want to plot a graph whose adjacency matrix is [0,1,0;1,0,1;0,1,0]. I first plot three points labeled by p1,p2,p3, and link the points p1,p2, p2,p3. For a general case, how to link the ...
4k 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}, ...
153 views

### Use of forest/tree&box, how can I get result as attached picture,use forest drawing table

1.I want to change the forest height dynamic,like this for tree={ grow=0,reversed, % tree direction parent anchor=east,child anchor=west, % edge anchors edge path={none}, minimum width=...
1k 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 (...
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?
1k views

### Simplest way to create a grid with colored squares and labels

I am trying to create a grid with colored squares, multi-line labels within the squares, and labels on the axes. Is there a simple and easy way to achieve this? This question is the closest I could ...
355 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 ...
439 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 ...
153 views

### How to draw the graph of function x+y=100

Following is the code for drawing the graph of x+y=4. Now i am thinking to draw the graph of x+y=100 for that what are the necessary changes in the given codes. \documentclass[12pt,a4paper]{article} \...
182 views

### Graphing y=x^2 and y=x

I want to draw the region bounded by y=x^2 and y=x. Any ideas? I was hoping this would be somewhat simple. I've tried used a similar, with \begin{axis}..\end{axis}, but it doesn't like that. Did I not ...
769 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 ...
2k views

### Family tree with multiple marriage ties

I'm trying to build a family tree, and among the many examples I've found online this one has been the most useful: How can I improve this family tree in TikZ? However, there are two things I cannot ...
485 views

### Flip x and y axis of ternary graph

I am trying to reproduce the USDA Soil Triangle. To do so, I would need to flip the x and y axis of the default pgfplots-ternary. I understand, that I could switch my inputs (don't really want to do ...
702 views

### Use “layered layout” with user-specified node ordering (i.e., without crossing minimization)

If and when someone answers this question in a way that demonstrates lua programming for TikZ graph algorithms, I will guarantee a 500-point bounty to that person. According to the PGF 3.0 manual, ...
4k views

### Chart with long x axis text labels looks ugly

Thanks to Caramdir and Alan Munn I am now able to create basic bar charts that use text as x axis labels. Functionally they are perfect, but some of them look kind of ugly. See for yourself: \...
750 views

### Typesetting a directed hypergraph in tikz

Similar to several other questions, I am trying to draw hypergraphs in tikz. I want to draw a directed hypergraph that looks something like those in this image from here: As opposed to other ...
4k views

### 2D and 3D vectors in Tikz

I would like to draw some 2D and 3D vectors in Tikz with certain properties. The following primitive graph sums what I desire: I just need the first quadrant of the Cartesian coordinate system for ...
2k 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 ...
437 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: \documentclass{...
894 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 ...
3k 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 ...
302 views

### Matrix from graph description

Are there any LaTeX package that draws/plots/generates a matrix from a "graph" description (node relations). Any type of description/language could be useful. The trick is to generate automaticly a ...
1k views

### Petersen graph with new tikz graph library

I'm considering moving from tkz-berge to the new tikz graph library for drawing my graphs (in the sense of graph theory). I have produced the Petersen graph, but is there is a more elegant way of ...
1k views

### How to automatically draw a graph?

Is there a simple package for which I can input an abstract graph and it returns a drawing? A similar question was asked in 2010, it did not receive any answers relevant to my question. I want no ...
157 views

### Is there a TeX-native way to generate a readable graph from an adjacency matrix?

related questions This question goes the opposite way from the conversion I would like: Matrix from graph description This question is almost what I want, but the vertex coordinates are manually ...