{plot} is for questions concerned with plotting data or functions using TeX. For questions specific to the pgfplots package, use the {pgfplots} tag.

learn more… | top users | synonyms

5
votes
3answers
131 views

How to graph an implicit polar equation?

I need to graph the following implicit polar equation using Latex I would be very thankful for any help. Thanks
2
votes
0answers
57 views

pgfplots 3D plots size versus 2D plots size

I wanted to create a 3D plot but it's not possible for me to set the right size. Should I try out until I find the right values for height and width for the 3D plot or is there an easy way to find ...
1
vote
1answer
117 views

How do you plot functions for straight lines $y=mx+c$ with labels and intercepts?

I've taken screen captures from other problems, but the results are poor. I'd like to be able to do lines, and move onto quadratic etc. later. y=3x+2 show & label x & y axes origin y ...
1
vote
0answers
35 views

How to draw a set of parallel related axis?

I want to draw several parallel axis, whose values are inter-related, for example: (source) (source) Note that: The axis don't have to be the same length (i.e. partial overlap is allowed). The ...
2
votes
1answer
129 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} ...
6
votes
1answer
96 views

Add Whitespace Around Plot Marks

I have a simple graph in PGFPlots, where the marks of two different plots slightly overlap: Around 50 and 100 the graph gets a bit too busy, so I would like to add some whitespace around the marks, ...
1
vote
2answers
193 views

Can some one help to draw this graph?

I am pretty new to Latex graphics I would like to aks whether the Latex could draw this picture? The function I used is : $ f(x)=\left\{ \begin{array}{ll} (x-5)^3-3(x-5)^2-18(x-5)+40 & ...
6
votes
3answers
297 views

Plotting the graph for exp(cos(1/x))

I am having issues plotting the function exp(cos(1/x)) in the domain (0,1) with pgfplots and TikZ using a normal addplot command with the function exp(cos(deg(1/x))). It seems LaTeX is having some ...
3
votes
0answers
57 views

LaTeX + Gnuplot on Mac: Plot Not Showing

Right. Total novice here so you might need to go easy. I'm trying to use Gnuplot with TikZ to draw an elliptic curve. Using TeXShop 3.58, Gnuplot 5.0 patchlevel 1... don't know what else is relevant. ...
1
vote
0answers
48 views

White space between the writing and image

i am inserting a pdf image into my paper. After cropping my pdf images, i still have some white space left between the writing section and the image. Can i get rid of it somehow. I am doing it like ...
0
votes
0answers
63 views

Making a phase portrait of two autonomous system of differential equations with latex

I am trying to make a phase portrait of two differential equations. The equations are: x'=x-y y'=1-x^2 I have tried to google it, and looked in here, but haven't found a sufficient answer. I did ...
2
votes
1answer
40 views

PGFPlots cycle list skips first definition after every cycle

I got some problems with self-created cycle lists in PGFPlots. As you can see, the plots skip the first definition of my cycle list after every run through the cycle list. Are there any coding ...
4
votes
1answer
118 views

I am trying to plot area vs volume

I am writing a lab report in chemistry discussing the surface of catalysts. I want to show that area doesn't increase proportionally to volume. I have been trying to plot a function vs against another ...
8
votes
2answers
316 views

Coloring intersection of curves

I've made the following code: \begin{center} \begin{tikzpicture}[domain=0:6] \draw[->] (-1,0) -- (6,0) node[below right] {$x$}; \draw[->] (0,-1) -- (0,6) node[above] {$y$}; ...
2
votes
1answer
74 views

Plotting a function without any coordinate system

I want to plot two functions about each other without any coordinate system. Can you please show me how/ give me a hint, how I can achieve this. \begin{tikzpicture} \begin{axis}[ ...
3
votes
2answers
529 views

Hysteresis Loop

I am new to latex. I'm doing my MA thesis on Magnetic Materials. I don't know how to draw this diagram in LaTeX. I would be grateful if you can help me with this image. Thanks.
1
vote
2answers
38 views

vertical line and extension of node in tree

I'm trying to generate a tree that has a vertical line coming through exactly in the middle, right after the 0.5 on the top node, and the 2 on the bottome node, and I would like to write 1.25,1.25 ...
1
vote
1answer
22 views

centering image generated by geogebbra latex code

I have the following code generated by geogebra and I tweaked it a little , specifically changed x,y to 3cm and scale to 4. But now I'm not sure how to center the picture, here is the code: ...
2
votes
1answer
180 views

Combine cross reference to multiple figures

I am writing a paper in Automatica journal format. The sample and style file can be found here. I want to use a cross reference to serveral figures such as Fig.~\ref{fig:aaa,fig:bbb,fig:ccc} and get ...
2
votes
1answer
82 views

latex files generated by tikzdevice leaves large space between image and caption

Ive been using the tikzdevice package in R to generate latex code of my plots, I've noticed that it always leaves a large white space between the caption and the figure itself, here is an example I ...
2
votes
0answers
76 views

How to create a plot like the one shown [closed]

My program is currently making plots which look like However, I would like to produce a plot with font and plot axes which looks exactly like the following: I do not care about the actual data ...
4
votes
2answers
100 views

tikz plot not correct [duplicate]

The following code generates the wrong plot: \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[domain = 0:1, samples = 500] \addplot[color ...
1
vote
2answers
132 views

Plot multiple functions when data-columns are separated by comma pgfplots

I have a csv file with 2 "columns" separated by comma. So the .csv file looks something like 0.123,0.3232 1.244,1.325 The above numbers are the "y-values" at x=0 and x=1 respectively, i.e. the ...
4
votes
3answers
141 views

Horizontal parabola [duplicate]

How does one draw a horizontal parabola, left or right oriented? I can easily draw: \draw[blue, line width=1.75pt, domain=-2.00 : 3.00, samples=1500] plot[smooth](\x, {\x*\x - \x - 2}); and even ...
5
votes
1answer
49 views

Color list not respected

I imposed a new color list but it is not respected in my code (that is the following). Every group of marks and the own line should have one color of the list. This is the result I have: ...
1
vote
1answer
85 views

Use pgfplots to plot a single column .txt file [duplicate]

I have a single column .txt file with the following info in it 1 2 3 4 5 I use the following ME and it does no work: \documentclass[border=1]{article} \usepackage{pgfplots} ...
2
votes
1answer
76 views

Plot a data/Table from Mathematica using `pgfplots`

I use data1 = Table[] in Mathematica 9 (M9) to generate a table of values. The thing is that when I read the data file, there's only one column! How can I plot this data file in LaTeX using pgfplots? ...
2
votes
3answers
91 views

LaTeX and Mathematica plot with same font/style

I know there are a couple of questions with answers to this but none of them seems to work for me so I ask here. Some basic facts: I have 1. Mac OSX 2. Very limited knowledge in Terminal (so things ...
0
votes
2answers
61 views

How to plot the Neilian Parabola with Latex?

I want to plot the Neilian Parabola with Latex. The problem of course is that at zero the curve has a singular point which leads to errors when trying to plot the curve. I've already searched on the ...
1
vote
1answer
100 views

Help with plot figure

I have the following two questions: I would like to move the "genomic position" label further down How can i draw the thing i added poorly in paint? This is the code ...
1
vote
1answer
100 views

Allee effect plot with Tikz

I'm trying to use Tikz to plot a rough schematic of the "Allee effect" in population dynamics. However, I've been struggling with the finishing touches. Below is my try: \begin{tikzpicture} ...
2
votes
1answer
151 views

Forest plot with TikZ

I'm trying to create a 'Forest Plot' in TikZ. An example of this is below: I have experience with PGFPlots but I can't find an example or even a starting point for something like this. The only ...
1
vote
1answer
108 views

Diagram in tikz

I've been trying to replicate this image , using TIKZ, but so far the results have been very bad. I'd like to know with you have tips/hints on how I should do it. Thank you!
1
vote
0answers
46 views

strange results when plotting a function that i declared

I've declared two functions, the first of which (Gamma) works fine, but the second gives me really strange results that aren't right (after checking in excel). I've tried changing al the parameters ...
1
vote
0answers
23 views

Histogram: problem labeling x axis [duplicate]

I would like to add on the x axis the value for each bar that are 400, 500, 600 and 700. I don't know why the only one that appears is 400. The code I used is the following ...
2
votes
2answers
94 views

How to create an grouped histogram with table annex

I am trying to code the following graph with latex. Can someone do it? (grid settings and colors are not important) the table is the following \begin{filecontents}{table.dat} T L F LF 400 ...
5
votes
3answers
68 views

Implicit plot - ellipses

I need to draw a pencil of conics: Given two ellipses $\left( \frac{x}{a_1}\right)^2 + \left( \frac{y}{b_1} \right)^2 - 1 = 0$ and $\left( \frac{x}{a_2}\right)^2 + \left( \frac{y}{b_2} ...
13
votes
1answer
350 views

Plot with magnifying glass, with a different plot in it

I would like to magnify a function plot, but in the magnified area I would like to draw a different plot. As an example, I edited an image taken from another discussion on TeX Stack Exchange I have ...
6
votes
3answers
433 views

Plotting the sign function

I'd like to create a graph of the sign function in my document: using pdfplots and tizkpicture (as used here). Could you please let me know how to define the function in the addplot part? ...
6
votes
1answer
305 views

Visualizing a set of complex numbers

Suppose I have an infinite unbounded set of complex numbers, for example all the numbers outside the unit circle. Is there some good way to visualize that set using LaTeX with some drawing library?
0
votes
0answers
61 views

How to create tikz figures via knitr forcing labels featuring LaTeX's font size modifier-commands?

Is there a way to force knitr to create tikz code which includes font size information? The output would be something like this: \begin{tikzpicture}[every node/.style={font=\footnotesize}] Here is ...
2
votes
1answer
77 views

Drawing smooth path of particle through magnet system

I need to get a plot with a trajectory of particle through system of magnets. So I know the coordinate and angle of particle on the edge of each magnet (like y=0,5 alpha=0.3rad) so how can I draw a ...
8
votes
1answer
253 views

Histogram: different color for each bar

I have the following code. \documentclass[a4paper,twoside,12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage[english]{babel} \usepackage{pgfplotstable} ...
0
votes
1answer
120 views

How to plot this integral function with PSTricks? [duplicate]

I have to plot something like that (the function I have to integrate is more complicate than this) How can I do that? Which pst package do I need? Thanks!
3
votes
2answers
210 views

Is there a guide on creating graphs in Latex for signal processing?

I wish to create a graph commonly used in signal processing, for example: I am not sure if I should go about exploiting Tikz or use some other software to generate this plot. Does anyone know if ...
0
votes
1answer
88 views

TikZpicture/pgfplots: How to reduce quantity of displayed xticklabels when using “xticklabels from table”?

I want to generate a simple x/y-diagram with data out of a data-table (~ 2000 values). Minimum Working Example (MWE): \begin{filecontents}{Data_Table.csv} X Y 00:00 0 00:01 50 00:01 100 ...
1
vote
2answers
92 views

How to decorate the intersection of two figures on TpX

There is a way to plot something like that on TpX?
3
votes
1answer
124 views

TikZpicture/pgfplots: How to insert time-data in mm:ss-format (without hh:) into x-axis?

Imagine an ordinary x/y-diagram by using the pgfplots/tikzpicture-packages: In case of regular date-values (dd-mm-yyyy) usually there is no problem in application. But now, I have to add times-values ...
2
votes
1answer
72 views

Set origin of y axis to 1

How to set the origin of y axis to 1? Minimal example: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{figure} \centering \begin{tikzpicture} ...
6
votes
1answer
103 views

Plotting piecewise function using declare function

I am trying to plot a piecewise defined function, but somehow I don't manage to get it right. See below. I use the following code \begin{tikzpicture}[ declare function={ func(\x)=(\x >8/10) * ...