Questions tagged [ticks]
The ticks tag has no usage guidance.
198
questions
3
votes
1
answer
40
views
pgf plots-Shifting the tick label down while changing the decimal seperator to comma (,)
I am working on a report in German, so the 1000x separator should be a period (.) and the decimal point should be a comma (,). I can format the PGF plot tick labels easily with,
/pgf/number format/.cd,...
2
votes
1
answer
34
views
How can I get minor ticks with a logarithmic x-axis of base 2?
Creating a plot with a logarithmic x axis of base 2 doesn't have a minor tick grid. Adding minor ticks manually yields the error "Package pgfplots Error: Sorry, minor ticks are not supported for ...
0
votes
0
answers
57
views
Polar axis, theta ticks getting misplaced
So I'm trying to compile some code in a large document to give me this graph of a polar function
\begin{tikzpicture}
\begin{polaraxis}[]
\addplot[domain=0:360,samples=300, color=red] {1 + 2*cos(...
1
vote
1
answer
27
views
Why do x and y axes not have the same default format using minor tick num?
As written, I would think the MWE below would produce identically labeled x and y axes, but it does not. The y-axis is missing half of its labels and their corresponding major tick marks. Uncommenting ...
0
votes
1
answer
50
views
How to make a tensor diagram out of quiver code?
I need to make a string/tensor diagram (something like this) out of this diagram made with https://q.uiver.app/:
Here is the corresponding latex code:
\documentclass{article}
\usepackage{quiver}
...
1
vote
1
answer
29
views
Define tick labels in PGFPlots with a variable
When I try to specify ticks / tick labels in PGFPlots using a variable (for automatic report generation for example), it works for the ticks, but not for the tick labels.
Here is the code I use:
\def\...
1
vote
1
answer
38
views
Hiding all tick-marks except for ones with custom labels
I've looked at many similar questions but none describe quite what I'm trying to do. I would like to hide all the tick-marks on my axis except for one, under which I have a custom label.
Here's a MWE:
...
0
votes
1
answer
37
views
Place tick scale label on top of plot contents
I came up with a pretty neat way to avoid overlap between tick scale labels and axis bounds for stacked plots by moving the tick scale labels into the axis windows, but unfortunately the lines are ...
0
votes
2
answers
56
views
How to remove ticks outside intervals ends
\documentclass[border=5pt]{standalone}
\usepackage{statistics}
\begin{document}
\StatsRangeData \tips = { 15.95, 12.60, 20.75, 22.20, 8.80, 15.60, 19.50, 20.60, 24.15, 9.85, 11.80, 12.75, 15.40, ...
4
votes
1
answer
136
views
How to put \SI in a yticklabel?
How can I get my pgfplot to let siunitx write labels on the form \SI{10}{\milli\metre}?
The following does not work:
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{siunitx}
\pgfplotsset{...
2
votes
1
answer
36
views
change negative y-axis labels to right side in pstricks
I have not been able to change the negative y-axis labels to the right side of the y-axis. This is what I need:
And this is what I currently have compiled with XeLaTex:
\documentclass{article}
\...
1
vote
1
answer
73
views
PGFPlots: add custom labels to alternative x axis
I have the following plot:
\begin{tikzpicture}
\begin{semilogxaxis} [
width=\textwidth,
height=0.4\textwidth,
xlabel={Frequency [Hz]},
ylabel={Volume [dB]},
xmin=10,
xmax=...
0
votes
1
answer
15
views
Set specific values on x axis on a logarithmic plot [closed]
I made the following plot
And it comes from data that I stored on a .csv, now the x axis is on a logarithmic scale and I only want ticks right below the points that are plotted. Fortunately, all of ...
0
votes
1
answer
73
views
Error in alignment of tick-labels in sub-figures [duplicate]
The tick labels are not aligning with the axis, but they are sort of differently aligned. As marked by the red vertical line.
Image:
MWE Code:
\documentclass[12pt, a4paper,
parskip=...
0
votes
0
answers
40
views
Use fractions for coordinate ticks [duplicate]
So I have some issues with the rounding of fractions, and I know that calculating fractions is notoriously difficult for a computer, so I am not too surprised this is not as easy as I want it to be.
I ...
0
votes
0
answers
34
views
TikZ environment ignores vertical axis range
I am attempting to create a TikZ graph where the vertical axis ranges from 0 to 1, and tick points at 0.33 and 0.67 with corresponding labels.
\begin{tikzpicture}[scale=0.75]
\begin{axis}
[...
0
votes
1
answer
54
views
Why last xtick of my PGFPlots graph is not showing?
I'm trying to draw a graph in Overleaf.
I'm using this template that I found online:
\begin{tikzpicture}
\begin{axis}[
title={C++ Threads performance},
xlabel={Number of particles},
ylabel=...
1
vote
0
answers
25
views
Adding labels and ticks to chronodex
Upon @MS-SPO's suggestion, I've included the refactored code here. I still need to add some ticks, labels indicating time and nodes for hours (12, 3, 6, 9). I did figure out adding nodes but they aren'...
1
vote
1
answer
84
views
Mimic GeoGebra's grid lines with pgfplots
Using pgfplots, I want to have grid lines similar to GeoGebra's. That is four minor ticks in between major ticks and a lighter color for the minor grid lines:
With the help of this post, I managed to ...
2
votes
1
answer
215
views
Ticks scaling - How to change the common factor multiplier to an offset value?
I am plotting the following figure using Python and I obtain this render:
Here, Python is automatically adding an constant value offset (+9.192682e9) on the y axis to read more easily the data.
Now, ...
1
vote
0
answers
31
views
pgfplot yticks missing depending on values of ymin and ytickdistance
I have the following minimal exmaple:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\definecolor{mycolor1}{rgb}{0.85000,0.32500,0.09800}%
\definecolor{mycolor2}{rgb}{0.92900,0....
1
vote
0
answers
54
views
Connect 2 nodes with an arrow from different figures
I am trying to connect 2 nodes from 2 different figures; is there a solution?
this is my attempt.
\documentclass [conference]
\usetikzlibrary{tikzmark, shadows.blur,arrows.meta,bending, shadings, ...
0
votes
1
answer
271
views
x,y graph with labeled point
New to graphing on latex. But I started something based on what I was seeing.
Current code:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}...
1
vote
2
answers
100
views
Add unit as single tick label
I want to use the second to last tick label as the place for my unit, as shown below.
Is there a way to replace it?
MWE:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{...
1
vote
0
answers
33
views
Is there a way to center the output of this assessment table custom environment?
The custom environment is created in the answer by Niel de Beaudrap here: Assessment table. However I can unfortunately cannot center the table in my tex file.
I have tried to use centering, \begin{...
0
votes
0
answers
27
views
Shift second right y-axis label and ticks [duplicate]
I would like to shift the second right y-axis label to the right along with the ticks so it does not interfere with the first right y-axis label and ticks. Here is the code and its output:
\begin{...
1
vote
1
answer
910
views
Adjust decimal precision of single ticks in tikzpicture [duplicate]
I have a little question regarding the decimal precision of certain single ticks in a plot generated by tikzpicture.
Minimal example:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{...
2
votes
1
answer
190
views
PGFplots: x,y ticklabel overlapping with the plot
I'm trying to plot two boxes using pgfplots. However, the tick labels are overlapping with the plot itself, which is quite annoying:
Ideally I want them so that, e.g. k_2^- is on the top of the red ...
1
vote
2
answers
56
views
How to get rid of unwanted tick?
How do I get rid of unwanted ticks like those specific ones I marked blue in the picture?
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{filecontents}{data.txt}
1 ...
1
vote
0
answers
33
views
Error in grid of log scaled .tikz file generated by matlab2tikz
I have generated a tikz file by matlab2tikz. The figure has grids in log mode. However, it does not show the grid at 2x10^7 although xmax=3x10^7, as shown here:
When I increase the xmax=4x10^7, it ...
1
vote
1
answer
149
views
How to draw a bar as a node
Could anyone tell me how is it possible to add "bars" as a node such as in the image below :
I would like to implement the "dl" segment :
\documentclass{article}
\usepackage{...
0
votes
1
answer
129
views
pgfplots, multiply values, add ticks without numbers
I am new to Latex and want to add some plots with pgfplots. I want to make musical tempo graphs. So the x-axis indicates the respective beat and the y-axis indicates the bpm value.
I need a tick for ...
2
votes
1
answer
85
views
Change to log axis using `contour prepared` in pgfplot
I have data that becomes almost linear when plotting it in a logarithmic contour plot.
Therefore I want to generate the contour lines externally and store the data logarithmically.
Then I want to use ...
1
vote
1
answer
86
views
Why aren't empty ticks working with empty plots?
I need to do an empty plot for my students to fill. Surprisingly the options xtick=\empty and ytick=\empty do not work when the plot is empty:
\documentclass{standalone}
\usepackage{pgfplots}
\...
0
votes
1
answer
226
views
missing a tick label that has been named
So I made this graph, and this graph can't show me the tick $\frac{5}{2}\pi$ at 7.85.
I've tried to enlarge the x max range, give extra ticks (and extra tick label) but nothing works. Anyone can help ...
1
vote
0
answers
505
views
Setting y axis discontinuity at a certain value
I got the following diagram, that I want to make discontinous at a certain value, so that the "unneccessary" parts are skipped.
I already tried adding an "axis y discontinuity", ...
0
votes
1
answer
245
views
Is it possible to have a plot with ticks but without their numbers?
I want to save space when stacking many axes over each other. The plots have common domain, and I don't want to lose space for the same information repeated (the numbers on the x-axis). Is it possible ...
0
votes
1
answer
213
views
Ticks formatting in PGF, how to switch to completely decimal without powers of 10 [duplicate]
The ticks are sticking close to each other, almost overlapping. How to change the ticks from $2.5\cdot 10^{-2}$ to just $0.025$ without changing the dimensions of the diagram ?
\begin{tikzpicture}
\...
3
votes
1
answer
705
views
Regular tick marks set to draw=none, but extra tick marks also not being drawn?
In the following code
\documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.17} \definecolor{gold}{RGB}{255, 184, 0}
\begin{document}
\begin{tikzpicture} \begin{...
3
votes
1
answer
232
views
Pgfplot with two y-axes not showing correct ytick values
I am trying to plot a graph with two y-axes but the values keep showing something else than what I intended. Any tips on how to fix this? Appreciate it.
\begin{tikzpicture}
\centering
\...
1
vote
1
answer
277
views
Imaginary unit automatic setup in tick marks for imaginary axis
I have seen solutions like this and this (in the question section), but they don't use the axis subenvironment in the tikzpicture environment.
If I make a 2-D plot, the ticks, tick marks, and tick ...
1
vote
1
answer
384
views
No tick labels in gnuplot epslatex
I am trying to plot a function in gnuplot with epslatex terminal to be included in a Latex file:
reset
set terminal epslatex color
set xlabel '$x$'
set ylabel "$f(x)$" rotate by 90
set ...
0
votes
1
answer
1k
views
How to shift bars in bar graph?
I have plotted the following figure:
I would like to shift the green bars to the right, so they become adjacent on the right of the blue bars. Yet the green and blue bars have the same vertical axis,...
1
vote
0
answers
63
views
Tikz Bar graphs with many coordinates per y value [duplicate]
I have a few problems with the following code:
\begin{figure}
\caption{test}\label{fig:sourceType}
\begin{center}
\begin{tikzpicture}
\begin{axis}[
xbar,
reverse legend,
...
0
votes
1
answer
310
views
Ticks on the y axis not working as anticipated
I am trying to have a plot where the ticks on the y axis are 1, 1.004, 1.008, 1.012, 1.016, and 1.02. However, only the ticks 1, 1, 1.01, 1.01, 1.02, 1.02 are shown in the figure (see below).
I was ...
2
votes
2
answers
86
views
Improving that tikzpicture pgfplot by breaking the domain
I'm trying to improve that figure:
\documentclass{standalone}
\begin{document}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{tikzpicture}
\begin{axis} [axis lines=center, height=46mm, width=120mm, ...
1
vote
2
answers
441
views
histogram ticks alignment
I'm trying to create a histogram in latex but the ticks are not aligning with the bars and i'm not sure why.
this is what i have so far:
\documentclass[12pt]{article}
\usepackage{fancyhdr}
\...
2
votes
1
answer
372
views
Increase the thickness of an arrow in xy and tikz-cd package
We start from these simples MWE. The first is done with xy package, with your tips:
\documentclass[a4paper,12pt]{article}
\usepackage[all]{xy}
\begin{document}
\xymatrix{A \ar[r]& B}
\end{document}...
2
votes
1
answer
556
views
How to define specific styles for each tick?
I want to change the style (such as color, font, size and shape of tick mark) for each tick.
In this example I want to change the color of the numbers (2,3,4) to something different and define a ...
1
vote
1
answer
270
views
Tick labels not showing when using `contour gnuplot` and `axis line = middle`
The following code is the modified answer of @user121799 in TikZ: Plot contour lines. The difference is that I added axis x line = middle, axis y line = middle in the first line of the axis ...