Questions tagged [axis]
For labels, markings, or other information, related to an axis of a graph
392
questions
1
vote
1
answer
39
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=...
1
vote
1
answer
32
views
looks like the dimension x-axis and y-axis is a bit off
Why is the scale not the same at x-axis and y-axis, looks like the y is a litte bit smaller.
\documentclass[border=1 cm]{standalone}
\usepackage{amsmath}
\usepackage{pgfplots,tikz}
\usepackage{bm}
\...
1
vote
1
answer
41
views
Pgfplot coordinates declared in \addplot
I am trying to plot data from a .csv with different data sets (no more than 4). I have added some additional input parameters just for debugging, at the moment the document looks like this:
\...
0
votes
1
answer
34
views
Placing axes origin at xmin and ymin
How can I place the axes origin at x=-20, y=2000?
\begin{tikzpicture}
\begin{axis}[
legend pos=outer north east,
legend cell align={left},
grid=none,
...
0
votes
1
answer
31
views
Executing a for loop inside PGF axis when #1 is in use
\foreach does not work inside PGF, so the alternative seems to be \pgfplotsinvokeforeach. My issue is that I want to define my own macros that will be inserted into the axis environment, something ...
0
votes
1
answer
41
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
1
answer
74
views
x-axis tiks label is showing separately
How to change the x-axis ticks of the plot to scientific notation? As of now the $$.10^4$$ is showing separately as marked in the red box.
Code:
\documentclass[tikz, border=1cm]{standalone}
\...
4
votes
1
answer
58
views
Is there a simple way to substitute a tick in the axis environment?
Is there a simple way to substitute a tick in the axis environment? I want to replace the tick defined by data (that is, xtick = data).
Below is an example where I add an extra tick. Since I'm adding, ...
1
vote
1
answer
31
views
How to format date inputed from file in date format and percentage?
I have inputs with tuple (date, percent) in a csv file:
(The date are integers with 44 000 <-> 18 June 2020)
date,pct
44755,0.01925374
44756,0.01925374
44757,0.01925374
[...]
44768,0.018989264
...
0
votes
1
answer
50
views
Tikz label angle between vectors
I'm trying to label the angle between the B vector and the y-axis but I don't know how. Can anybody help me with this? My code is the following
\begin{figure}[h]
\centering
\begin{tikzpicture}
\...
0
votes
2
answers
79
views
Latex drawing Argand Diagram with axes in terms of pi?
I am attempting to draw an Argand diagram, with a circle centred at (0, −16π), radius 16π.
The issues are that my diagram has the real and imaginary axes adjacent to the axis, but I would like the ...
0
votes
0
answers
22
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
0
answers
18
views
Repeating axis labels in bar chart
Using the following latex:
\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\begin{axis}
[
ybar,
nodes near coords,
bar width=0.4cm,
symbolic x coords={2--3 times a week, 4--6 times ...
0
votes
1
answer
36
views
set axis limits automatically in stacked bar plot
This is a stacked bar plot:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ybar stacked,
...
0
votes
0
answers
31
views
TikZ pgfplots reverse x axis values
Yes, I know there are loads of examples on this site, but I haven't found anything that works for me.
I tried to reverse the x axis values with x dir=reverse, but what i get is this
How do I make the ...
0
votes
0
answers
14
views
How to correctly place a subgraph inside a graph in a texfile generated by tikzplotlib?
Executing following code in Python generates a figure with a smaller subplot for clarity:
import numpy as np
import matplotlib.pyplot as plt
import tikzplotlib
x = np.array([1, 1.1, 2, 3])
y1 = np....
1
vote
1
answer
88
views
Plotting eye diagram with pgfplots
I'm a student writing my master thesis and would like to be able to plot eye diagrams in LaTeX using pgfplots. I have a csv file that contains the data on the eye diagram in a "time, voltage"...
2
votes
1
answer
67
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
20
views
How to label the value increments on the x and y axis
I need to label the x and y axis with points like \sqrt{5} and pi on the axis correctly and proportionally to the line, how do I do this
0
votes
0
answers
48
views
Changing the text format of a particular label in pgfplot
In this plot I want to change the color of a label in x-axis. For example I want to change the color of Set1 to orange. It is possible to do it simply by \textcolor{orange}{Set1}, as you see in the ...
0
votes
1
answer
39
views
Adding trig format = rad to my TikZ axis options causes the y-axis to not show up correctly
I need to add trig format = rad for a plot to work, but it messes up the y-axis. Try adding a % before it and you'll see what I mean.
Here's my MWE:
\documentclass{standalone}
\usepackage{pgfplots}
\...
0
votes
1
answer
63
views
Can I change scale in the same axis in PGF-TiKZ?
I want the x axis to have different scaling in diferent regions. I want it to be more "spread out" in values higher than 2000, like this example:
Is it possible to do in PGF plots?
3
votes
1
answer
51
views
Asinh scale in pgfplots with small parameters
I have recently asked a question about introducing an asinh scale in pgfplots. While the solution given in there does implement an asinh scale, when I tried to implement it in my particular case I've ...
3
votes
1
answer
118
views
How to reproduce Python's matplotlib Asinh scale using pgfplots?
Python's matplotlib has an axis scale known as "Asinh". Close to zero, it behaves as a linear scale, but far away from zero, it behaves as a log scale. It is interesting for logarithmic ...
2
votes
1
answer
33
views
Right bracket marker in tikzpicture axis to draw closed set
I'm trying to draw a simple set interval with left/right paranthis for open sets and left/right brackets for closed sets. Here's how I'm drawing it:
\begin{adjustbox}{width=\textwidth}
\begin{...
0
votes
1
answer
19
views
Reading data on a table prints the bars of a bar diagram in reverse
I'm trying to draw a bar diagram but it seems that the bars are reversed.
Let's take "Canada" for example, I would like to have 48 as first value, 24 and then 59, not the other way around. I ...
1
vote
1
answer
42
views
Is there any simple way to change my bar graph alignment and increase its width on LaTeX?
So I'm pretty new to using LaTeX. I created this bar graph, but it's too wide to fit in my PDF doc. I don't want to rotate the graph. I also need this graph to be aligned to the flush left margin of ...
2
votes
0
answers
36
views
Symlog for PGFPlots
I'm trying to plot data that ranges from [-1e8,1e8] and I would like to represent it using a symmetric log plot. I've found this solution to my problem but it seems the axes fail as soon as the data ...
1
vote
1
answer
40
views
Plotting function + labelling only the units on my x-axis
this feels like a stupid question but I can't find a solution.
I'm trying to try to make this work and I don't why it doesn't...
Here's my code :
\documentclass{scrartcl}
\usepackage[usenames,...
0
votes
1
answer
93
views
Drawing a number line with fractional points
How can I draw following number line using tikz?
I tried taking help of Help drawing a very simple number line using TikZ but when I input numbers, they are drawn very close to each other. Any hint ...
1
vote
2
answers
89
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{...
0
votes
1
answer
76
views
axis lines on top fill between and clip marker don t work together
Taken independently the options work. But together :
the fields are above the axes and the 1 is not displayed
Field 2 and 3 are above axis
Different color for Line and Field
I tried several proposed ...
0
votes
2
answers
61
views
Extend the axes while keeping the graph within the coordinate system
I want to extend the y-axis so that the value of the maximum on the graph isn't at tip of the y-axis arrow. (I also want to extend the x-axis for the same reason). See an example below:
What I want ...
1
vote
1
answer
96
views
Graph about diode and operation point
Good Evenning, I want draw this graph that has 2 graph, I use the tikzpicture package and axis.
A graph is a signal input(left), and anotar is signal output (below).
I want replicate this graph.
And ...
1
vote
3
answers
292
views
How to remove the scale indicator on y-axis
I would like to plot some data, whose y-coordinates are kind of small. I compiled with the following codes, and I ended up with an unexpected $10^{-2}$ on the y-axis (see the figure below). Is there a ...
0
votes
0
answers
90
views
How can I draw this graph with axis from tikzpicture?
Good Evenning, i want draw this graph that has 2 graph, i use the tikzpicture package and axis.
A graph is a signal input(left), and anotar is signal output (below).
\begin{tikzpicture}
\begin{...
0
votes
1
answer
72
views
How do I use the axis as an anchor for horizontal alignment? [duplicate]
I want these two distances to be equal, when I add the y label it "pushes" the axis for the right. Is there any way to anchor the axis in tikz/pgf?
\documentclass{article}
\usepackage{float}
...
2
votes
0
answers
63
views
pgfplots (xbar stacked): Small percentage values are getting overlapped
Problem: I want the the small values (<10% such as 10%, 7% and 6%) for N=12 and N=6 in the (a) and (b) bar-charts to be properly visible and not get overlapped with each other. I tried to change ...
1
vote
1
answer
39
views
Why is PGFPlots not respecting my axis name placement?
PGFPlots isn't respecting my axis label placement. Why is x label style={at={(...)}} (and analogously for the y axis) not working?
MWE:
\documentclass[11pt]{book}
\usepackage{pgfplots}
\pgfplotsset{...
0
votes
1
answer
58
views
grid disappeared
I am trying to plot this thing
and the furthest I got is this:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[english, russian]{babel}
\usepackage{tikz}
\...
0
votes
1
answer
52
views
The ytick labels are too small and they need to be in multiple lines
Problem: I am trying to align the ytick labels in two lines as the labels look small for the figures. To reiterate, as shown from the below figure, I want N=3 in one line and add the number in square ...
2
votes
1
answer
107
views
TiKz-pgf: Project intersection points in the abscissa axis
With some effort, I was able to find a way to mark the intersection points between the Gaussian bell and the straight line.
Leaving aside the first point, I would need to project the two intersection ...
1
vote
1
answer
45
views
Trouble with gaussian
Taking this example, I build my gaussian bell
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\pgfmathdeclarefunction{gauss}...
1
vote
1
answer
31
views
How do I stop tikz from using scientific notation in the y axis?
\documentclass{article}
\usepackage{import}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\begin{document}
\begin{figure}[h]
\centering
\begin{...
1
vote
1
answer
85
views
Small values in the stacked bar-chart are not visible properly
Problem:
I want the the small values (5% and 6%) for N=48 in the (a) and (b) bar-charts to be properly visible and not on the grid. I tried to change the limits, increase the size but unfortunately ...
2
votes
3
answers
129
views
Last chart in a group of bar-charts should have two columns
I am trying to generate a group of bar charts with 3 figures and successfully completed that and the output can be seen below.
Problem: I want the first two bar-charts (a and b) in the same state, but ...
1
vote
1
answer
42
views
Repositioning axes, their arrows and tiks in pgfplot
I am making a 3D plot using the pgfplots package. I have rotated the graph which best shows response curve I wish to depict. However, the position of the axes are not desirable. Furthermore, the text ...
1
vote
2
answers
468
views
Add axes and label to an external picture
I have this image plotted in Mathematica where the frame label looks very bad.
Is there a way to add the log-log axis in tex to overlap with the picture. Say I use this picture without the axes. How ...
1
vote
1
answer
36
views
pgfplots graph with secondary y-axis not same width as without secondary y-axis
In pgfplots, how can I make a graph with secondary y-axis to be the same width as the graph without secondary y-axis? I am already specifying the same width, but clearly in the output they are of ...
0
votes
1
answer
56
views
How to have alternate coloring of histogram bars
I am kindly requesting for assistance on how to have the color of my histogram bars alternate between blue and orange. Currently the bars all have the same color which is something I do not like. ...