Questions tagged [x-axis]

For questions related to the formatting of the x-axis in a plot

332 questions
0
votes
0 answers

How can I remove the "day' and 'month' values of datetimes in a DataFrame and plot only the hour values for the time series X-axis?

I have a datetime64 values in a pandas DataFrame as a timeseries (time_coord) X-axis of my plot as seen in the figure attached. How can I plot these time coordinates values without the month (12) and day (11) but with the time in UTC? I want to show…
Dub
  • 11
  • 4
0
votes
1 answer

X axis for plt.plot not consistent with data for x axis

Below is a snippet of the code I am using to analyze the volume of ES (s&p futures). esVolume = (es['Volume']).loc['2023-03-15 09:00:00-04:00':'2023-03-15 10:29:00-04:00'] plt.plot(Time.minute(900,1030), esVolume) Why does the x-axis include…
quant
  • 17
  • 5
0
votes
0 answers

X-Axis Data not lining up with X-Axis labels in React ApexCharts

I am using the React version of ApexCharts in a web app and have already successfully applied it in several places. However, I am having some issues getting the x-axis data to line up with the x-axis labels in one chart. As you can see in the…
gwydion93
  • 1,681
  • 3
  • 28
  • 59
0
votes
1 answer

Add secondary x-axis at the bottom in ggplot

I want to create a plot and add a secondary z-axis. The problem is that I don't want the secondary axis on the top, but I want both x axis at the bottom of the graph. any ideas how to do it? I have this data frame: df <- read.table(text="Control …
0
votes
0 answers

React ApexCharts component only renders data in first chart

I am using react-apexcharts to visualize some data. My chart components are generically fed the data in the parent component. I have 3 charts all in the same component. The first component renders correctly but the second and third chart components…
gwydion93
  • 1,681
  • 3
  • 28
  • 59
0
votes
1 answer

Trim x-axis of a ggplot2 graphic

I've plotted data from 1999-2021 and I want the chart area to be trimmed so that I don't see the empty space of 1998 or 2023. I want the line to begin in 1999 and end on 2021, or exactly the amount of data I have.I've tried a few things like: …
0
votes
0 answers

How can I plot a graph from a specific date to the last date available

I've just did the following graph: But juny 22 is not the last date available. How can I plot this graph from des. 19 to the most recent date? plot2 <- ggplot(taxa_atur, aes(x=time, y=values, color= geo, group=geo))+ geom_line(linewidth=1,…
Maria
  • 173
  • 7
0
votes
0 answers

React-D3: How can I specify explicit x-axis tick values?

I am making a line chart where the x-axis is 'time'. The incoming data may cover variable time periods; however, it will reliably be reported at 1-week intervals. I'd like to specify explicitly the domain for which ticks are created on the…
0
votes
1 answer

ggplot - x-axis according to date (AND open-ended last date)

There seems to be a lot of posts where you want to change the date in ggplot for a specific time-period, and that's easy if you want to just combine some date - however, I want to: (preferably) set the start value to be the max value of my…
Christian
  • 117
  • 1
  • 3
  • 10
0
votes
0 answers

How can I see mpandroid barchart x-axis label completely?

I draw barchart in my Android project, but I can't see x-axis label completely about g, j....etc. These letters are not shown completely. The letters cut off. I chaged many things like margin, padding.... but I can not change x-axis label. My code…
심영수
  • 1
  • 1
0
votes
0 answers

xAxis Labels disapper when chart height is too large (1500). Labels become visible when window minimized

So I have a heatmap. I have adjusted its height to display large data set. It works fine with less data. when data is large like 200+ labels on axes, The xAxis labels disappear on first load (Image1) When I minimize the window, all labels appear…
0
votes
0 answers

How can I change variable name on Bar chart?

enter image description here How I can replace X-axis variable name by using "Race/ethnicity" column not 0,1,2,3,4,5? Bar chart like this
rowrowrow
  • 1
  • 2
0
votes
1 answer

Is it possible to display in a chart the axis in reverse, from example the x axis from right to left and the y from left to right? React-chart-js

I am trying to reverse the axis in a chart,what i want is to have to line of the chart running from left to right and the date.now() from right to left? How can i accomplish that? I have tried to do x: { reverse: true }, y:{ reverse: false }
0
votes
1 answer

How to format numerical labels into datetime labels on a plotly xaxis in python?

I have a plotly scatter plot like this example: x = [1,2,3,4,5] y = [3,2,3,5,6] fig = go.Figure() fig.add_trace(go.Scatter(x=x, y=y)) fig.show() Now I want to label the x-axis numbers as dates with this dates for example: dates =…
till Kadabra
  • 478
  • 9
  • 21
0
votes
1 answer

In a barplot in R, is there a way to choose which labels will be shown in X axis?

I have data to be shown on a barplot, with groups varying between 1 and 50. However, not all labels appear on X axis. I really don't want all of it, but from 5 to 5. Can I choose this? R is naming bars on a random order (sometimes from 4 to 4,…