{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

2
votes
2answers
83 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 ...
0
votes
0answers
56 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 ...
3
votes
1answer
79 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 ...
1
vote
1answer
58 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
30 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: ...
5
votes
1answer
127 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), ...
0
votes
1answer
62 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
41 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
456 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
4
votes
1answer
105 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 ...
2
votes
4answers
88 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 ...
0
votes
4answers
181 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$
1
vote
1answer
47 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
1answer
149 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 ...
3
votes
1answer
57 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 ...
5
votes
1answer
153 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
39 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} ...
1
vote
1answer
48 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 ...
1
vote
1answer
73 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 ...
6
votes
2answers
81 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 ...
3
votes
1answer
109 views

Plot Tikz graph defined with two variables, ie 4=x^2+y^2

I want to plot a graph of 4=(x-2)^2+(y-2)^2, How do I do that within tikz plot? I have tried re-arranging but it just throws errors at me! \draw [domain=0:4] plot ({\x},{2-\sqrt{4\x-\x*\x}}); Is there ...
5
votes
3answers
103 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
46 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
96 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
28 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
99 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
83 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
176 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 & ...
5
votes
3answers
258 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
37 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
44 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
50 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
29 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
111 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
286 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
67 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
467 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
33 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: ...
3
votes
1answer
69 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 ...
1
vote
1answer
59 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
69 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
67 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
96 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
125 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
44 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
58 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
58 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
84 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 ...