For questions related to the formatting of the x-axis in a plot
Questions tagged [x-axis]
332 questions
1
vote
0 answers
How to use the index of data as x-axis in R
How do I call the index of my data.frame in R like this
x <- index(data)
y1 <- data$y1
y2 <- data$y2
My data.frame have 3 variables. My ID variables does not have all unique values, as most of my individuals have two scenarios. While the index…

kiniena
- 11
- 4
1
vote
0 answers
Plot coloured region X axis in PyQtgrpah
I need to plot a graph in PyQt5 with PyQtgraph with custom plot like this in QtChart:
enter image description here
Linkt to the cutom QtChart example: https://doc.qt.io/qt-5/qtcharts-customchart-example.html#running-the-example
I think in…

Heavy Metal Drummer
- 37
- 2
1
vote
1 answer
Add space above x-caption on D3js multiline chart
I am trying to add space between xCaption and x-axis labels on D3js multiline chart but not able to. Also, how can I get rid of the last x-label (the one after 5).
const XCaption = svg.append('g')
.attr('class', 'x axis')
…

hs27
- 65
- 8
1
vote
1 answer
How to format Plotly xaxis to be shown in H:M:S format
I'm trying to create a custom plotly chart where I have a column that represents the seconds since the start, and instead of showing the value in seconds I would like to format it to be in HH:MM:SS format as in the following example:
But when I…

Leonardo Ferreira
- 673
- 1
- 6
- 22
1
vote
0 answers
How do you correct ApexCharts datetime range on X axis?
I've created a Line graph using Apexcharts in vanilla javascript. The series values have corresponding dates, but for some reason, the month of march is left out of the x axis date labels.
The sample data:
series: [
{
name: "Parker, D…

Oliver Mclean
- 11
- 1
- 2
1
vote
1 answer
R ggplot multilevel x-axis labels in faceted plots
I trying to use the trick of using two calls to annotate() to get 2-level nested tick labels (here) BUT I want to do this in conjunction with facet_wrap()
df <- tribble(
~action, ~gend, ~status, ~cellMean,
"P", "M", "A", 1,
"P", …

D. Bontempo
- 176
- 1
- 1
- 9
1
vote
1 answer
How can I hide automatic x axis title in plotly to set my own, updating is also an option
I want to set a fitting x and y axis name on my px. box() graph, the problème is that the automatic name doesn't disappear:
fig1 = px.box(birth_price_box1["price"],
log_x=False,
color =…

Corentin Metral
- 11
- 2
1
vote
1 answer
Plotting a secondary x-axis in ggplot based on another column in the data
I am struggling to find if it is possible to plot a secondary x-axis (on the top of the linegraph if possible) using an entirely different column in the dataset. I've been looking for a while, so apologies if this has been answered already. For…

mattyice216
- 13
- 3
1
vote
1 answer
Adding multi level X axis
I am having difficulty adding a multi level axis with month and then year to my plot and I have been unable to find any answers anywhere. I have a dataframe which contains the upload date as a datetime dtype and then the year and month for each row.…

Jonas_Konig
- 109
- 1
- 11
1
vote
0 answers
Control interval for Labels on 'xAxis' in React Native Chart Kit
I created a Line Graph based on react-native-chartkit with user's weight data which changes over some period of time. I am trying to visualize the proper time interval between weight entries. Does anyone know if it is possible to control the space…

Agata Kosek
- 31
- 3
1
vote
1 answer
How to add space between xAxis line itself and the bottom edge of the bar on Apache Echarts
Here is a design pic for reference, note the 2px of space. The axisLine > lineStyle doesn't offer a padding property. Any suggestions? Chart design example

Shanizzle
- 13
- 3
1
vote
1 answer
Align another object with scatterplot+marginal boxplots
I've generated a scatterplot with marginal histograms on the x and y axes, using this extremely helpful answer from @ClausWilke (reproduced below).
library(cowplot)
# Main plot
pmain <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color =…

Timmo83
- 119
- 5
1
vote
2 answers
How to plot date in a proper format in x-axis in the completeness of the follow-up plot in r car package?
I am trying to plot the completeness of the follow-up plot in r but I am experiencing a problem with x-axis in plotting date in a proper format although I put it in the correct format in the dataset using POSIXct
My code and sample…

Mohamed Rahouma
- 1,084
- 9
- 20
1
vote
1 answer
Assign points to a specific range on x-axis
I generated this graph with ggplot2, (I manually added red rectangle)
I want to somehow "label" the x - axis intervals.
For example; from 1.45e+08. to 1.46e+08 is named as "low" , 1.46e+08. to 1.47e+08 as "mid" and I only want tho show this lables…

juylmin
- 47
- 7
1
vote
1 answer
C# Excel Interop Chart Column Series Problem
I am reading a 16 Row, 270 Column Excel file. After some algorithms and comparisons, I create a new Excel and a new chart in the new Excel. The chart is incorrect when Excel contains more than 16 columns.
Here is my chart creation code;
xlRange2 =…

Gürkan Özdem
- 109
- 7