{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

14
votes
5answers
1k views

How to plot x^(1/3)?

I tried to export my Geogebra graphs into tikz-code. In General it works fine, but plot x^1/3 doesn't work: \documentclass[10pt]{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} ...
0
votes
1answer
403 views

Special characters in knitr generated figure caption

I would like to pass special characters and formatting with the knitr generated captions. I am trying to understand two things: 1) Is it possible to pass LaTeX syntax through the caption? 2) How ...
2
votes
0answers
186 views

Automatically generated plots with Mathematica

I am currently using Mathematica to generate several plots later included in a LaTeX document. The process of exporting each of the graphs to eps/pdf and including these in the document is quite ...
5
votes
3answers
261 views

Why must the independent variable of a function to be plotted be a macro in TikZ?

Consider the following code (taken from Jake's answer) and focus on the variable of the function to be plotted. \documentclass[border=5pt,tikz]{standalone} \begin{document} \begin{tikzpicture} ...
4
votes
1answer
697 views

Bar plot with error bars and two data rows

I am already close to the solution I'm searching for. I want this graph http://tex.stackexchange.com/a/35749/38544 with two data rows. Thus I took the code, duplicated the addplot-section and removed ...
8
votes
0answers
139 views

Is there a better way to display this information? [closed]

I have drawn this picture in tikz. Is there a more visually pleasing and intuitively appealing way of displaying this information? I feel what I have drawn is dull and boring. I have to include more ...
11
votes
1answer
291 views

Problem with legend in pgfplots

I want to make plot with fill area. I try this code \documentclass[a4paper,12pt]{report} \usepackage{pgfplots} \definecolor{plotmain}{HTML}{97bbcd} \pgfplotsset{every axis legend/.append ...
0
votes
0answers
28 views

How to prevent plots being printed out of document's sections? [duplicate]

I am preparing a document using knitr in which I have multiple charts within two or more sections. The majority of the plots is printed at the end of the document but I would like them to stay within ...
5
votes
3answers
290 views

How do I draw graphs?

I'm new to Latex and I think I am going to use it for my physics classes in school. I have found a really good template: https://www.sharelatex.com/templates/journals/aip/ (I use sharelatex) which is ...
1
vote
0answers
79 views

How to set a shaded area around 2d plot curve on a pgfplots figure? [duplicate]

I plotted a 2d figure of a curve but I also want to show variance of the value with a shaded area around the curve line. How can I do it in pgfplots? Here is my current plot.
10
votes
2answers
710 views

plot 3d graphs of functions defined implicitly

How can I plot 3d graphs of functions defined implicitly (quadratic forms, for Linear Algebra course notes -- I'd like to include lots of examples)? As far as I can see it is not possible with ...
3
votes
2answers
241 views

Plot from scratch (without explicit data)

I'm trying to draw a plot which I've been given in a scan: What is the correct way to plot a custom shaped curve --- a freehand tool counterpart. I used quick curve but it's hard to tell extremum ...
2
votes
1answer
166 views

Adding extra ticks based on sum of ybar stacked

I am trying to add minor yticks on my axis based on the end values of a ybar stacked plot. Here is where I'm at: \documentclass[tikz]{standalone} \usepackage{pgfplotstable} \pgfplotstableread{ Year ...
8
votes
1answer
1k views

Problem with a TikZ/Geogebra plot of an exponential function (even if using CVS version definition)

I wanted to graph the function f(x)=(-1+4x^2)*e^2 in a coordinate system. Using "Export Graphics View as pgf/TikZ" in Geogebra I got the following code (here shown after I did some minor changes ...
3
votes
2answers
232 views

Making given y-axis data in dB?

I learned recently how to draw in pgfplots and is really enjoying the output. I generate my data in matlab and then write it to a file. One line of the file will contain two entries, first x-axis data ...
2
votes
1answer
554 views

Example code of PSTricks in MikTeX

everyone, in the past one hour, I have been fighting with the PSTricks package in MikTeX. I found a lot of example code here. For example, I downloaded the gliding ball example tex and I ran it in ...
2
votes
2answers
149 views

How do I group curves in 2-D plots with pgfplots

In the above image, you can see that there are 4 curves. I have two techniques (black and red). I test them on two different experimental scenarios. So corresponding to each scenario, I get one red ...
3
votes
0answers
199 views

Using TikZ with DokuWiki

I am using DokuWiki to write my notes. The one thing that I am missing is the ability to plot. I would like to use TikZ to fill this need, but I have been unable to get exactly what I want. I am using ...
2
votes
2answers
257 views

Binary Sector overlay diagram in a radial plot

I am analyzing some data from a system that can have some binary configurations. I thought that a good strategy would be to visualize the output as a radial plot and overlay its binary configuration ...
8
votes
3answers
636 views

Create heatmap with PSTricks or TikZ

I have a huge amount of 2D-coordinates, associated with a value, e.g.: x | y | value 27.50 52.15 12.51 61.83 13.32 57.56 36.23 21.83 41.73 40.46 85.67 25.20 ... The data is ...
2
votes
1answer
209 views

Knitr plotting outside margin

I like the look of plots that extend beyond the margins \documentclass{article} \usepackage{lipsum} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \centering ...
3
votes
1answer
638 views

How to set Tikz scatter marker weight?

I'm using tikz to produce scatter plots as shown in this question. I can define the marker size with \tikzset{mark size=8} but now I'm looking for a way to make the line of the marker thicker in a ...
3
votes
1answer
251 views

tick mark/range problem on graph generated using TikZ

I'm having a little difficulty getting a tick mark on a graph generated using TikZ to appear correctly. The code is below and the problem can be seen in the vertical axis of the second graph (b). How ...
7
votes
1answer
627 views

Graph showing functions over the same x and y ranges

I want to draw functions and have used this code. But I don't like to give every function a separate domain, I want to say this function has ymax=4 and ymin=-3. Who can help me? ...
1
vote
0answers
33 views

x axis domain/range in a plot [duplicate]

Please consider the following code of a plot and its result. What I want to be shown in the plot is the actual values of the x axis i.e 1000, 5000, 10000 and not 0.1*10^4, 0.5*10^4 , 1*10^4 to be ...
3
votes
2answers
503 views

Packages to plot functions such as the logistic function (or “S-shaped function”)?

Is it possible to plot the graph of an S-shaped function in LaTeX? If yes, then how? Which packages should I use for that?
7
votes
1answer
351 views

TikZ doesn't find all intersections between plot and a line

Why doesn't TikZ find all intersections. They are obviously there … \documentclass[border=10mm]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} ...
8
votes
1answer
764 views

How to project a function over a 3D plane

When I looked up the method to express two variable functions as a sequence of intersecting horizontal planes, I thought to use PGFplots to construct a simple set of "slices" of a generic function ...
4
votes
1answer
489 views

Axis labels and ticks in degree, plot in radian

I've got a plot - the x axis is in radian (from pi/2 to pi) and with gnuplot it works like a charm - the problem is - that my x-axis labeling should be in degree (-90, -75,...,90) and i'm kinda stuck. ...
2
votes
1answer
90 views

Vertical labeled markers

I have a plot with four curves, and I wish to add vertical marker to pinpint the exact moment the curve drops below a certain threshold, much like this: I'd like to be able to control the width of ...
4
votes
0answers
361 views

Creating plots in Latex - easy to learn? [closed]

I am currently working on my summer project for which I created the following plot with Mathematica: Now I am not 100% satisfied with the results and one of my professors recommended PGF and TikZ. ...
7
votes
1answer
499 views

Create a Shmoo plot with pgfplots/tikz

I'm interested in creating a Shmoo-plot using LaTeX. I have looked through the PGFplot-examples but couldn't find any that looked suitable as a starting template. Google produces nothing as well, and ...
5
votes
2answers
367 views

Drawing boxplots with pst-plot

I'd like to draw in the same frame a given number of box plots with the macro \psBoxplot from the pst-plot package. I'm retrieving the sampled data from as many files as different box plots by using ...
6
votes
2answers
489 views

Plot basic complex transformation in LaTeX

I want to first draw a shaded region on a xy-plane: 0≤x 0≤y≤π and then the image of the above region mapped onto a uv-plane by the transformation f=exp(z), i.e. the shaded region: ...
3
votes
1answer
306 views

pgfplots: show x tick labels for data below ymin

I have a very simple bar chart plot. My problem is when I set a ymin value, all x labels whose values are below that threshold will not be displayed. I'd rather have the labels but no values shown. ...
1
vote
1answer
266 views

How to plot a curve between two nodes?

I've got two nodes and would like to draw a specific curve between the two nodes, such that the curve begins at the first node and ends at the second node. The curve and its domain are already ...
4
votes
0answers
233 views

Sage + Latex - How to change a font for axes label? [closed]

I use Sage and LaTeX and when I do this: \begin{sagesilent} p2 = list_plot(zip(H, f(5)), True, color='blue', axes_labels=[u'$H,$ км',u'$\mu, c$']) p2.fontsize(14) \end{sagesilent} and run sage ...
8
votes
1answer
317 views

proper tool for charts in tex

I have scanned data graphics in a large ms written in TeX (of course). For copyright reasons I need to redraw these. My publisher may (sadly) decide not to use my source directly, so will need access ...
5
votes
1answer
273 views

Making a log plot with negative values “continuous”

I'm trying to plot some data on a log axis using PGFplots. The data include negative values. Obviously, these can't be displayed on the plot, but I'd like the plot to "run into" the lower edge to ...
8
votes
1answer
395 views

plotting the sequence x_n using tikz

I want to plot the sequence x_1 = \sin(pi root(2)) x_2 = \sin(pi root(6)) x_3 = \sin(pi root(12)) In short my x_n = sin( pi root(n^2 + n)). I want to plot this as an animation as n goes to ...
3
votes
1answer
671 views

Getting correct labels on axes with PSTricks

Consider the following example. Code % latex test.tex % dvips test.dvi % ps2pdf test.ps \documentclass{article} \usepackage{pst-coil,pstricks-add} \def\turister#1#2{% ...
8
votes
1answer
2k views

How can I display tick marks on only one axis of a pgfplots graph?

How can I display tick marks on only one axis of a pgfplots graph? Here is some simple code to work with: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} ...
42
votes
2answers
2k views

Draw polarized light

I was trying to draw something like that Searching through the net to see if it already exists in tikz I came accross in texample.net the following image which looks a lot like what I want to draw. ...
2
votes
0answers
51 views

X-Y plot with variable diameter points [duplicate]

I want to draw an X-Y plot where each point has a kind of "third dimensional" value that I want to represent using different points "size" (points are circles with different diameters). I already ...
4
votes
2answers
2k views

drawing a line in polar coordinates

I have a point in polar coordinates (110:2cm), but from here I want to draw a line straight down. Doing (110:1cm) is a line towards the center along 110 degrees. Without taking 2*sin(110) and ...
1
vote
1answer
134 views

Eps Position Problem [duplicate]

I am trying to put a graph inside my TeX file it somehow misses its original places and moves somewhere else. What can I do to fix it? Here is my code: \documentclass{article} ...
1
vote
0answers
106 views

IEEEtran and using plots [closed]

Within a IEEEtran 2 column document, 2 plots are too small concerning their width. Should I place them (a) vertical or (b) interrupt the 2 column layout? btw it will be submitted to a conference. ...
2
votes
1answer
200 views

Multithread integral function executing picture

I need to make a picture that should look like I saw a similar question here but the red function line appears neither when I use --shell-escape nor when I use --enable-write18. I use TeXstudio, by ...
11
votes
1answer
247 views

Join two function-based curves in Tikz

I have the following: \begin{tikzpicture}[line cap=round,line join=round] \draw[dashed,domain=0:9,samples=20] plot (\x,{1/(\x+.5)+3}); \draw[dashed,domain=0:9,samples=20] plot (\x,-{1/(\x+.5)+2}); ...
3
votes
2answers
819 views

Similar to Excel's line charts?

How could I create charts as the follow ones, which were produced by Microsoft Excel?