{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

4
votes
2answers
49 views

Plotting a recursive defined set of functions with conditional base function

I'm trying to visualize the construction of B-Spline functions by showing step by step how the curve is created. This involves painting curves similar to these: The function that creates the curve, ...
2
votes
0answers
22 views

Graph is plotted wrong with pgfplots

currently trying to make a graph with the forumla 0.5+(2x/3) but it does not seem to be correct? This is the code I am using (sorry if it looks bad :D) \begin{tikzpicture} \begin{axis}[ ...
17
votes
4answers
24k views

draw a plot with point

i try to draw something like this : to do that i have write some code using tikz,unfortunately i dont get what i want \documentclass{report} \usepackage{tikz} \usetikzlibrary{automata,topaths} ...
1
vote
0answers
61 views

How to explain the intuition of distributional moments using a figure [closed]

I want to create figures to explain the meaning of the (first four) moments of a distribution (with this I mean: Mean, Variance, Skewness, Kurtosis). The goal is to use this in teaching stats. I am ...
2
votes
3answers
280 views

Plotted line in tikz stops in middle of grid

The plotted line stops and doesn't go on till the border of the grid: This is my code: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \begin{document} ...
4
votes
1answer
52 views

problem with tikz function plot

I have an error in a function with trace tikz I draw three functions of the form 1/2 (Acos (w * t + phi) + abs (Acos (w * t + phi))). the three functions are shifted 120 ° the route of these three ...
2
votes
1answer
62 views

How I can change values on the Y-axis

\documentclass{article} \usepackage[sc]{mathpazo} \usepackage{pgfplots,amsmath} \usepackage{tikz} \usepackage{tkz-fct,tkz-base} \usepackage{tkz-tab,tkz-euclide} \usepackage[miktex]{gnuplottex} ...
2
votes
1answer
58 views

pgfplots boxplot first column as draw position

I have data like this in a file. 1 0.1 0.2 0.3 0.8 ... 5 0.3 0.5 0.6 0.9 ... 10 0.2 0.3 0.7 0.10 .. ... How do I tell boxplot to use the first column as draw position and compute the box for the ...
7
votes
2answers
180 views

Area Bounded by 4 Curves

I would like to plot the area bounded by the following four curves: x^2 - y^2 = 4 x^2 - y^2 = 1 xy = 1 xy = 2 I'm fond of pstricks but tikz is fine too, whichever is simpler would be best. I ...
1
vote
0answers
43 views

Please help me plot this graph [closed]

How do I plot the following? Plot phi_(1)(t) vs t with the initial conditions phi(0)=0=[phi(0)]' for the equation [phi(t)]"+ 4.7124 [phi(t)]'+88.8268sin[phi(t)]-115.4749 cos(6.2832 t)=0 Plot ...
1
vote
0answers
43 views

How can I plot a google maps in sharelatex?

I found a way to do this but not in Sharelatex, it is possible? The problem is activate \write18 in sharelatex, how can I do this? \documentclass{article} %\usepackage[latin1]{inputenc} ...
1
vote
1answer
150 views

How to draw parallel curves using TikZ?

Does anyone know how can I draw the curves in picture using TikZ? What I have done so far are only two curves which intersect each other but I cannot go further that that. Here's my code ...
0
votes
0answers
12 views

bringing legend in next line

how do i bring the legend in the next line. I am facing a problem with very long legend strings. How can bring some string in the next line. Ex:- plot "datafile" using 1:4 with linespoints lw 3 pt 6 ...
1
vote
2answers
103 views

How to draw intersecting two lines on a plane?

I tried to draw linear graph on a plane with intersection (2, 1) as the above referring to the following website: http://pgfplots.sourceforge.net/pgfplots_unstable.pdf But mine doesn't even appear. ...
2
votes
2answers
111 views

How Can I Decorate a Parametric Curve?

I'm trying to draw a special parametric curve, but my results are not good enough, because I'd like to decorate it. So, I've tried this: \documentclass[10pt]{article} \usepackage{pgf,tikz} ...
1
vote
0answers
25 views

Fixing horizontal axis in pgfplots [duplicate]

I have the following plot and I would like to have the horizental axis fixed, but it scales and therefore I cannot see the details of the values between 0-50. To be more specific, in the horizental ...
2
votes
1answer
54 views

Adding emphasis to a PGFPlots function

I have a function plotted with PGFPlots, and I'd like to add some emphasis to some maximum values and to some minimum ones, like the image below. How can I achieve that? (Sorry if duplicated, but my ...
3
votes
1answer
63 views

Exponential Function with “wrong” Plot in PGFPlots

While experimenting with PGFPlots, I found out a little weird issue: I want to plot the function given by f(x) = 2^x, so I type: \begin{tikzpicture} \begin{axis}[ axis x line = center, ...
2
votes
0answers
74 views

How to draw irregular 3d shapes in TikZ?

I would like to draw the cylinder-like irregular shape displayed below using TikZ. I know how to plot regular cylinders using TikZ, however the commands I know don't apply for irregular 3d shapes, ...
2
votes
1answer
46 views

Move y-axis in pgfplots

I wanted to get my plot to look like this: I would like to get some help to move the y-axis to x=0. Thanks for your help and time. Here is the code that I have so far: \documentclass{article} ...
9
votes
2answers
3k views

Center nodes near coords in a stacked ybar plot

I'm trying to center the node values, at the middle of each bar, in a stacked plot. However I can only put those nodes in the top of each bar. Is it possible to move those down? To the center of each ...
4
votes
1answer
72 views

centering tikzpicture

I have some problems concerning the command \centering. I want to put a tikzpicture in the center of the page but I can't do it. I tried with \centering and with \begin{center}...\end{center} but ...
2
votes
1answer
79 views

2D correlation plot matrix with shapes

Is there a straightforward way to create a correlation plot matrix similar to the figure below? The image is an example of R's corrplot package using circles, which also offers other shapes and ...
3
votes
1answer
109 views

Plotting issue with PGFPlots `\addplot'

Can someone help with workaroung about such issue? \addplot [only marks, mark=o] table[x index=0,y index=1,col sep=comma] {data.dat}; works just fine, but \addplot [only marks, mark=bullet] ...
1
vote
1answer
42 views

Some issues with a stacked area plot - pgfplot

I have three issues with a stacked area plot. 1: I want to make the plot more width to fit it in my presentation. But if I scale in x-direction it also scales the fonts (labels). How to avoid that? ...
3
votes
1answer
64 views

Drawing line of best on semilogy graph and showing it's equation

I have some data which is related by the relationship y = B*exp(Cx) I want to be able to plot the data and determine the value from the relationship: ln(y) = ln(B) + Cx I have raw data values of x ...
1
vote
3answers
185 views

How to do a chart with stacked bars, lines and “sections”

The problem I need a chart like this (this was made in Libreoffice + some gimp): Its caracteristics are bassically: Some stacked bars (if it is a stacked area, better) with its Y axis at the ...
3
votes
1answer
82 views

How to approach the drawing of this sort of scatter plot?

I'm trying to plot a data set that contains the results of some benchmarks across a number of tools on a set of input files. The problem is that there are more than 3000 test cases and I need to ...
0
votes
0answers
63 views

Insert a gnuplot-plot in tikz environment

I cant manage to get my plot into a tikz environment. I am using BaKoma Tex Word with newest MikTex. %&latex \documentclass{article} \usepackage{tikz} \begin{document} \section{About ...
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 ...
1
vote
1answer
86 views

How to draw stacked area chart

I want to plot a stacked area chart. Stacked area chart => All values get stacked and the areas under the lines get's colored. Something like this: My data in a minimalistic example: ...
0
votes
0answers
33 views

Drawing 3D cylinder with Tikz [duplicate]

I wanted to draw a 3D cylinder on top of a set of axes, and I don't know how to do this. My idea is to draw two circles, one at z=-1 and the other at z=1 and the somehow fill in the region between ...
1
vote
1answer
43 views

3D plot in Tikz - Points at the top connecting

I've made a plot of the function $z = sqrt(x^2+y^2)$. Here is my output: At the top of my plot, the points are connecting. How do I stop this from happening? Here is my code: ...
4
votes
1answer
159 views

Drawing function in tikzpicture

I have to draw function with \plot but it says "Dimension too large", this is my code: \begin{tikzpicture} \begin{axis}[grid=major, xmin=0, xmax=3, ymin=-1.5, ymax=1.5, xlabel=$t$, ylabel=$x(t), ...
3
votes
1answer
106 views

Legend problem with horizontal bars in pgfplots

I have a problem with a weird offset with horizontal bars in a pgfplots legend. They seem to be moved "up" a bit, so a part of them is hidden under overflow. An image of the situation which explains ...
0
votes
1answer
73 views

How to Draw a 3D Rectangular in LaTeX?

I try to draw the following picture using LaTeX: I try the follwoing code but it does not look similar to what I want: \documentclass{article} \usepackage{tikz} \definecolor{cof}{RGB}{219,144,71} ...
1
vote
1answer
50 views

Creating codes by drawing figures [duplicate]

I am beginners to LaTeX and I have been trying to learn Tikz & PSTricks for graphics. My Question is: Is there any other software available in which we can draw our desirable figures (like graphs ...
2
votes
7answers
485 views

How to graph piece wise function. f(x)={-x for -l<x≤0 & 0 otherwise}

f(x)={-x for -l<x≤0 & 0 otherwise} How to graph the above equation. pls help. also explain
3
votes
1answer
184 views

Algebraic curves in TikZ or Asymptote

I want to draw algebraic curves in asymptote, but I do not know how this works. Has anyone an example? If we want to plot for example k[x,y]/\langle x^2+y^2-1\rangle, where can I input the equation ...
4
votes
1answer
123 views

Plotting in latex

I have to produce few charts a week and finding very hard/time consuming typing in code for plots using Tikz. Graphs i have to produce are simple,most of the time linear or exponential and does not ...
0
votes
4answers
217 views

Plot Graph with axis

Lower curve is given by function y=$\left\lfloor {\frac{x+2}{2}} \right\rfloor$ and Upper curve is given by formula y=4 for x=2,3 while y=$2 \left\lceil {\frac{x}{3}} \right\rceil$
2
votes
4answers
95 views

How to fit x-axis and y-axis to show a domain?

I try to draw this spiral by Matlab t=[0:0.001:4*pi]; x=(1/2)*(exp(exp(-t))+exp(exp(-t-2*pi))).*cos(t); y=(1/2)*(exp(exp(-t))+exp(exp(-t-2*pi))).*sin(t); plot(x,y); but I want to show the domain ...
1
vote
1answer
66 views

tikz plot coordinates decorations change between points

I have a plot of coordinates \draw plot [smooth] coordinates{ (-3.1,-0.5) (-1.5,0.3) (0,0) (1.8,0.64) (3,0.5)}; Is there a way to have the curve between (0,0) and (1.8, 0.64) painted thick? I ...
3
votes
5answers
537 views

TikZ and analytic geometry

I have four given points, for example A(3,2) B(5,4) C(-3, 4) D(-3, 0) Using TikZ/PgfPlots, how can I draw them in the Cartesian coordinate system, show the points, each accompanied by its name ...
5
votes
1answer
289 views

How to draw a parametric 3D curve in tikz

I would like to use tikz or a similar LaTeX package to draw the following curve in a three-dimensional coordinate system (t^2, t*(1-t), 1-t) for t in (0,1). Is there an easy way to do this? Thanks!
2
votes
1answer
47 views

pgfplot - groupplot print x label only once in the last row

In the below group plot, the xvalues are common for all the subplots. I want the x labels to be displayed only on the last row of the group plots. \documentclass{article} \usepackage{tikz} ...
6
votes
2answers
91 views

Error in pgfplot when big offset is subtracted

I have some data with a huge offset that I want to plot. Im using PGF plots, where it's possible to subtract the offset from a whole row in my data. This works when the offset isn't too big, and/or ...
1
vote
1answer
131 views

change color of line in legend image (tikz pgfplot)

I want to change the color of the line in the legend image, because the line color in my plot is different to the mark color. \begin{figure}[h!] \begin{tikzpicture} \begin{axis}[legend pos=south ...
2
votes
1answer
119 views

different colors in xlabel (tikz latex pgfplot)

I would like to change the color of a part of my x label in my pgf plot. \begin{figure}[h!] \begin{tikzpicture} \begin{axis}[xtick pos=left,legend pos=south east, xlabel style={yshift=-0.5cm}, xlabel ...
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