For questions related to the formatting of the x-axis in a plot
Questions tagged [x-axis]
332 questions
0
votes
0 answers
ggplot2 dodged boxplot with geom_point dodging and unequal number of subgroups
I am attempting to plot a dodged boxplot but I run into a couple of difficulties. First of all, the x-axis basically has 2 types of grouping: the "letter-groups" (A, B, C etc...) are the main groups, I specify these as my "X" aesthetic…

pleasehelp
- 87
- 6
0
votes
1 answer
How to shift over the x-axis to not overlap with heterogeneity information? Forest plots in R
I'm trying to plot a forest plot but everytime I do so, there is an overlap of the text of the heterogeneity information with the x-axis of the forest plot. How can I edit my code so that this overlap doesn't happen (i.e., the x-axis is spaced away…

mishera
- 11
- 4
0
votes
0 answers
Highcharts (HighStock) not show tooltip attached at it's corresponding x-axis
I have a highStock chart in my app. this chart has 3 y-axis and 2 x-axis. I show one x-axis at bottom and the other one at the top. and splited three Y-Axis by 'height' property.
And I linked yAxis[0] to xAxis[0] and the other two y-axis to second…

Mo Asghari
- 251
- 2
- 11
0
votes
1 answer
R: ggplot reorder x-axis with facet_wrap and coord_flip
I have two data frames which I want to plot together using facet_wrap, like this:
# create data frames
d = data.frame(
f = rep(c("f1", "f2"), each = 4),
x = rep(c("a", "b", "c", "d"), 2),
y = c(0, 2, 3, 3, 2, 1, 0, 6))
#…

enileve
- 180
- 1
- 11
0
votes
1 answer
Add a tick to top x axis
I do not really understand why this code is not working
fig, ax = plt.subplots()
ax.plot(Vg_vec, sigma_i)
ax.set_xlabel('$V_\mathrm{g}$ ($\mathrm{V}}$)')
ax.set_ylabel('$\sigma_\mathrm{i}$ ($\mathrm{C/m^2}$)')
peaks, _ = find_peaks(sigma_i,…

bea boh
- 3
- 2
0
votes
1 answer
Excel Multiple Series Chart with Time on x-axis
I have two series of daily data, displayed on a Scatter Plot with date on the x-axis. One series is orange, the other is blue. Here is the chart:
Scatter Plot
The x-axis labels appear on the major tick marks every 100 days. I want the labels to…

Brendan Rafferty
- 3
- 4
0
votes
0 answers
scatterplot problems with x-axis not being readable
ggplot(data = Covid_data_filtered, mapping = aes(x = Pneumonia.Deaths, y = Covid_Deaths))+geom_point()

CM_Garrott
- 1
- 1
0
votes
0 answers
How to Add More Spacing Between X Axis Ticks and Labels MATPLOTLIB
I've been looking online for help but nothing that I have seen is helping me to add space between the xticks without losing any xtick labels on the x axis. Here is my code and the things that I have tried to get the figure below to the current…

user2100039
- 1,280
- 2
- 16
- 31
0
votes
0 answers
Shift Matplotlib Axes to Match Overlaid Plots
I have a plot that is an overlay of a boxplot and a scatter plot (red data points). Everything is fine except that the red data points are not lining up on the x axis with the boxplot x axis. I think this is because two different plot methods are…

user2100039
- 1,280
- 2
- 16
- 31
0
votes
1 answer
How to draw geom_line with 4 groups and how to limit x-axis with no data
Data:
Group Year Month Mean
Group 1 2018 Jun 1.58
Group 1 2018 Jul 0.92
Group 1 2018 Aug 3.52
Group 1 2018 Sep 5.9
Group 1 2018 Oct 5.95
Group 1 2018 Nov 11.21
Group 1 2018 Dec 13.55
Group 1 2019 Jan 4.67
Group 1 2019 …

Vinod
- 9
- 4
0
votes
1 answer
Feeding pyplot with different size arrays on x and y values
I have two numpy arrays. One is for x axis entries, the other is for y axis as you can see in the code below
plt.figure(figsize=(10, 10))
plt.plot(range(0,len(TVals_R)),TVals,'bo',markersize=1,label='Dry Run') #I need x and y arrays in…

mrq
- 274
- 1
- 2
- 14
0
votes
1 answer
ggplot time series: messed up x axis - 2
This is modified version of this question.
I need to create time series plot for 2 lines for the following data:
# Creating data set
year <- c(rep(2018,4), rep(2019,4), rep(2020,4))
month_1 <- c(2, 3, 7, 8, 6, 10, 11, 12, 5, 7, 8,…

Iraleksa
- 155
- 1
- 9
0
votes
0 answers
In R, how do I change the number and spacing of the tick marks on the x-axis of my plot when the values are dates?
I have to create a plot of prices over time, and the time is given in dates down to the month. The problem I'm having so far is that there are just four tick marks, for 2005, 2010, 2015, and 2020, and they're spaced really far apart. It looks ugly…

izzyjk
- 1
0
votes
1 answer
Is there a way to change the offset in the maplotlib IndexLocator?
Current project is to graph a series of time frames all normalised to the same even which happens at different time during the year, each year.
Each time cycle has a defined start and end which is stated in reference to an event within the cycle. In…

LennyB
- 63
- 6
0
votes
1 answer
In matplotlib, is there a method to fix or arrange the order of x-values of a mixed type with a character and digits?
There are several Q/A for x-values in matplotlib and it shows when the x values are int or float, matploblit plots the figure in the right order of x. For example, in character type, the plot shows x values in the order of
1 15 17 2 21 7 etc
but…

Joonho Park
- 511
- 5
- 17