Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [axis]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
32 views

Only display max/min values on axes in Pgfplots

I have the following function in pgfplots: \begin{tikzpicture}% coordinates \begin{axis}[xlabel=$x$,ylabel=$y$, axis lines = center, every axis plot/.append style={ultra thick}, ymin=-1,ymax=7] \...
2
votes
1answer
57 views

pgfplots: How to set true dimensions of axis

I would like to have axis dimensions in real TeX units. \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=0, xmax=1, ymin=0, ...
1
vote
0answers
26 views

Remove exponential factor when using custom x-axis labels [duplicate]

I set the xtick-labels to π/2, π and so on. Now because my x-values are small an exponential factor is still drawn under the x-axis. One workaround is to multiply all my values by hand with 1000. I ...
1
vote
1answer
35 views

Pgfplots axis labels misplaced (half page away from the grid)

\documentclass[letter,12pt]{article} \usepackage{pgfplots} \pgfplotsset{tyyli/.append style={axis x line=middle, axis y line= middle, xlabel={$x$}, ylabel={$y$}, axis equal }} \pgfplotsset{every x ...
2
votes
1answer
45 views

How to highlight a point in line graph by drawing a circle around it?

I want to highlight a point (i.e., (3, 4.8)) in the following line graph by drawing a red circle around it. However, as you can see, the circle is not drawn at the expected position. Why? And how to ...
3
votes
1answer
55 views

How can I use arrays in a PGF axis environment?

I would like to use an array in a PGF axis environment. This array would have the parameters values of a function to be plotted. I tried writing the following code: \documentclass{standalone} \...
3
votes
1answer
61 views

Keep zero in the centre of axis

I want to understand if I can keep the x axis automatically "centred" around 0, i.e., having the absolute axis option values for x min and x max equal, without setting them explicitly. The following ...
2
votes
2answers
127 views

xmin, xmax, ymin, ymax

I am trying to draw a picture of a concave function. I would like the axes to start at (0,0), however when I draw the picture as you can see below the y-axis starts below 0. I have tried running ...
3
votes
0answers
130 views

possible (major) bug with pgfplot axis labeling?

I tried compiling a bunch of files today, all of which use tikzpictures and pgfplots. Something truly odd is happening with how the y-axis label is being positioned. I took the MWE from Positioning ...
5
votes
2answers
130 views

Tikz - Coordinates error when using draw with axis

I am using the following code, which is supposed to cut a function in N parts : \documentclass[11pt]{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} ...
2
votes
2answers
42 views

Hide some tick numbers in a TikZ/PGF axis environment

I want to plot a function using the axis environment. The code for the axes so far is \begin{tikzpicture} \begin{axis}[ axis lines = middle, axis line style = {Stealth-Stealth, very thick}, xmin = -....
2
votes
1answer
48 views

Error using extra y ticks, trying to evaluate it : Package PGF Math Error

Hello there here is a minimal code : \documentclass[border=2pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{graphics} \usepackage{tikz,pgfplots} \begin{document} \...
3
votes
1answer
89 views

Custom Labels right side of the axis

I am having problems with custom labels and its position, especially with negative values in the coordinates. I do not get the position on the right side of the y axis and its height is shifted if the ...
0
votes
1answer
33 views

how to have a table close to scope plot?

I would like to have a table near by a plot. I know how to have a table but not know having a plot near by the table. I have attached my table code and figure that I want to have. Thanks in advance. ...
2
votes
1answer
50 views

Create dashed intersections with labels using pgfplots and tikz

Problem: I have several minor issues that I can not seem to be able to solve. Add and position labels to x/y-axis Add dashed intersections Show x/y-axis numbers for -1 and 1 Minimal Working Example ...
0
votes
1answer
103 views

Different xtick distance for different x ranges

I created a graph using tikz, which ranges from -10 to 10 for the xaxis. The graph has an xtick distance of 2, but I want to change the xtick distance so I get this: -10,-5,0,2...10. From -10 to 0, I ...
0
votes
0answers
20 views

tikz axis: Symbolic x coords are shown multiple times [duplicate]

When i compile this latex code \begin{figure}[H] \centering \begin{tikzpicture} \begin{axis}[ ybar,enlargelimits=true, ylabel=Zeit(ms), symbolic x coords={gRPC, WCF, REST}, ...
2
votes
1answer
43 views

Highlight part of axis with label on top

I have a pgfplot with time as x-axis variable. I would like to highlight certain periods of time and put a name on top of the upper x-axis. \documentclass{article} \usepackage[utf8]{inputenc} \...
3
votes
1answer
89 views

Sphere on axis with defined radius

I Hope someone can help me. I want to make a picture like this in latex. Everywhere I'm searching there are examples that are much too complicated, I think. I can draw a circle, but LaTeX don't ...
1
vote
1answer
30 views

pgfplots: y axis arrow pointing down

How can I make the y axis arrow positioned in the other end of the axis and pointing down? \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{makecell} \setcellgapes{...
1
vote
0answers
26 views

Add axis label to subfloat images

I need to set an x-label and a y-label to each subfigure, can I add labels to \subloat[]? \begin{figure}[H]% \centering \subfloat[]{{\includegraphics[width=6.75cm]{ProfitV1.png}}}% \qquad ...
1
vote
1answer
39 views

Draw a line from the center of a circle to the edge:

I'm trying to draw a circle with some radius vector drawn from the center of the circle to the edge (preferably at 45˚) and then a bunch of smaller circles – all on the xy-axis. I have the following ...
3
votes
3answers
65 views

Minimal page size for 2 tikzpictures

I am trying to prepare a graph for a colleague to use. I have created the graph but wanted to crop the white space surrounding it. I have tried to use the standalone document class but this results ...
0
votes
1answer
33 views

How can I underbrace the x-axis in PGFPlots?

I don't know why, but the command \draw doesn't seem to work in my code. Ideally, I would like to see this: My code is: \begin{tikzpicture} \begin{axis}[ axis lines = left, xmin=0, xmax=...
2
votes
1answer
49 views

tikz node exceeding axis

I have an axis environment in a tikzpicture with a straight line exceeding the axis. At the end of the line I add a node whose text partially also exceeds the axis and is clipped. Clipping the line is ...
0
votes
0answers
14 views

pgfplots input axis settings from an external file [duplicate]

I want to plot multiple figures with the same settings, but different content. I would then like to be able to change the settings in all plots at the same time. To achieve this, I'd like to store the ...
1
vote
1answer
60 views

Position common factor when scaling axis

I am drawing 8 pretty small scatterplots (4x2) using groupplots. On one of those the x-values range from around 1600 to 5500. Since the plots are pretty small, the labels for the ticks overlap. ...
1
vote
0answers
30 views

pgfplots: How to align dateplot with two x axis?

Assumed we have this Minimum Working Example (MWE) to display a dateplot with two completely identical x axis, but with different xtick positions: \documentclass{standalone} \usepackage{pgfplots} \...
0
votes
3answers
50 views

How to create axis with annotations?

I want to get horizontal axis with annotations, like in attached picture. What package would be most suitable for such task?
2
votes
1answer
31 views

pgfplots: Change names of weekdays to German language?

The user Torbjørn T. has posted a nice approach on how to display the names of the days of the week in dateplots. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \...
3
votes
1answer
56 views

pgfplots: How to add names of the days of the week to dateplot?

Assumed we have the following code: Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \usepackage{filecontents} \usepgfplotslibrary{dateplot} \begin{filecontents}{data....
0
votes
0answers
34 views

Tikz x labels as images creates asymmetrical spacing

I sort of stumbled upon the idea of using pictures as x-axis labels for my graph in a thesis. However, I have run into the problem of the last label being further away (not symmetric) to the other ...
2
votes
1answer
38 views

pgfplots: Difference between “xmin” and “date ZERO” when using dateplot?

Assumed we have the following code: Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \usepackage{filecontents} \usepgfplotslibrary{dateplot} \begin{filecontents}{data....
2
votes
1answer
114 views

pgfplots: How to set xticklabel as two line?

I want to design xticklabels as two line texts: First line: Date, e.g. \month/\day Second line: Time, e.g. \hour:\minute Minimum Working Example (MWE): \documentclass{standalone} \usepackage{...
1
vote
1answer
42 views

pgfplots: Are parentheses mandatory in axis environments?

Assumed we have this little code snippet: \begin{tikzpicture} \begin{axis}[ date coordinates in = x, table/col sep = semicolon, date ZERO ...
1
vote
1answer
31 views

Legend entries labeled incorrectly with two

I have a graph with three plots and two y-axes. Two of the plots use the left y-axis and one uses the right y-axis. In order to get a single legend with all three plots, I am using the ideas in this ...
1
vote
1answer
113 views

pgfplots: Using “x filter” to decrease point density of plot

The user esdd has posted a nice approach on how to increase point density for a certain range of data points while the remaining plot keeps low point density by using x filter. Minimum Working ...
0
votes
1answer
41 views

tikz picture: unit instead of penultimate number of the axis

Is there a way to insert the unit instead of the penultimate number of the axis like this? 0 1 2 3 m 5 Thats something my university wants to see in my Bachelor thesis... But after searching ...
2
votes
2answers
64 views

pgfplots: Restrict “each nth point” to specific domain only?

I have a huge amount of data. Therefore I want to reduce the data displayed by decreasing the amount of points with each nth point = {!value!}". Minimum Working Example (MWE): \documentclass[tikz]{...
1
vote
1answer
11 views

Changing the position of scaling

when i run this code, I get a 10^4 on the bottom right, which seem strictly false. I would like to get rid of this one. And on the top left I have the scaling for the y-axis. I would either like it to ...
1
vote
0answers
36 views

pgfplots: How to set “axis on top” only for abscissa and ordinate, but not for grid? [duplicate]

I try to format a ybar diagram nicely. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ybar ...
2
votes
1answer
117 views

pgfplots: “axis on top” will cross out ybar value nodes?

Assumed we have a simple ybar diagram including ymajorgrids. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{...
1
vote
1answer
32 views

Insert numbers below each column of a histogram

I am trying to plot a histogram by below lines \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[>=stealth] \draw[<-] (7,0) node[below] {$x$} -- (-.5,0); \draw[->] (0,-...
0
votes
0answers
60 views

pgfplots: Is “scale only axis” only necessary for documents but not for standalone?

Assumed we have this kind of code: Minimum Working Example (MWE): \documentclass{article} \usepackage{showframe} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[height=\...
3
votes
1answer
164 views

pgfplots: How to add time axis as second x-axis?

I preprocessed a series of data into a time column and a further column with time distance to zero, the latter as decimal value. Minimum Working Example (MWE): \documentclass[border=5mm]{standalone} ...
2
votes
1answer
53 views

Difference between having \begin{axis} blablabla \end{axis} and \draw[->]?

What is the difference between them? Which one is better for what purposes? If im writing a paper in mathematical analysis, which should i use?
0
votes
0answers
44 views

How can I embed an external image within the TikZ environment in the axis positions?

From How can I embed an external image within a tikzpicture environment? I can see that \includegraphics can be used within a TikZ environment using \node. However, my tikzpicture includes an axis ...
1
vote
1answer
87 views

pfg axis discontinuity options

is there a way to set the length of the discontinuity in the x axis? Here is the code I have used: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \...
2
votes
3answers
108 views

Inset plot in pgfplots with zero opacity - mixed grids

I am trying to draw an inset within the region of a pgf plot by creating a second pair of axes, as can seen in the following code. \documentclass{standalone} \usepackage{tikz, pgfplots} \begin{...
0
votes
1answer
64 views

“scaled ticks=true” is not working

I’m having problem with the scaled ticks options. I just would like to have 10–5 at the top of the y axis and some numbers along the y axis... I commented %scaled ticks=true in the attached ...