Questions tagged [x-axis]

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

332 questions
2
votes
1 answer

Logging Year values to xAxis

I have an SVG Element which want to be a line Graph. The xAxis of the graph should display years (best with 1 year intervalls: 1980, 1981, ...) My dataset has year-values which I extract into a d3.extent variable which retruns the 2 year values I…
Jakob QN
  • 21
  • 3
2
votes
1 answer

How to change x-axis labels in Boxplots?

I want to get a picture like this (just focus on the boxplots): As you can see the x-labels of the picture represent the average spacing of the boxplot. I'm trying to make something similar using seaborn, matplotlib, pd.boxplot but I couldn't get…
2
votes
1 answer

How to sort the order of x-axis for bar chart in PowerBI?

Hi everyone, I have a bar chart as shown in the screenshot above. The order for first 2 bars are correct, but the order for subsequence bars in the chart are wrong. The 3rd bar should be the category of 2% - 3% and the 4th bar should be 3% - 5%…
weizer
  • 1,009
  • 3
  • 16
  • 39
2
votes
1 answer

r: Order on discrete x-axis is not following specified relevel

Problem: Factors on x-axis are not releveling Let's say I have this boxplot Generated with these data: set.seed(1) y <- data.frame(loglos = log2(runif(1000)), corona = as.factor(c(rep("C19", 50), rep("Normal", 50))), …
cmirian
  • 2,572
  • 3
  • 19
  • 59
2
votes
0 answers

Apexchart xaxis labels showing as numbers instead of strings in Reactjs

I use the ApexCharts library for my bar graph. But my xAxis labels only show me numbers ranging from 1 to 5, and I don't know where that comes out. In my xAxis I try to put an array of dates that I get from my data. To know that i used the…
Mohamed Sacko
  • 233
  • 1
  • 2
  • 20
2
votes
1 answer

How to evenly space non-sequential dates on x-axis in ggplot?

Suppose I have data for the years 1913, 1928, 1929, ..., 1938, and I want to plot these years on an x-axis where each year is evenly spaced, i.e., same distance between 1913 and 1928 as between 1928 and 1929. How can I do this in ggplot? Everything…
Panflap
  • 23
  • 3
2
votes
1 answer

Reduce number of tick labels on JavaFX xAxis

Up from a certain number of plotted ticks the labels on the xAxis are rotated by 90 degrees into a vertical position. I would like to keep them horizontal and only plot as many as are fitting to the xAxis. This shows how it looks and how I would…
JTfx
  • 43
  • 4
2
votes
1 answer

Mpandroidchart text not properly showing on x axis on line chart

I am working on Mpandroidchart. I have created a line chart and tried to place strings on my xaxis. final ArrayList xAxisLabel = new ArrayList<>(Arrays.asList("March","April","May")); private ArrayList lineChartDataSet(){ …
Moeez
  • 494
  • 9
  • 55
  • 147
2
votes
1 answer

Seaborn Box Plot X-Axis Too Crowded

Good Day, See the attached image for reference. The x-axis on the Seaborn bar chart I created has overlapping text and is too crowded. How do I fix this? The data source is on Kaggle and I was following along with this article:…
deity
  • 23
  • 4
2
votes
1 answer

Suppress one x-axis, keep the other with ggtree and geom_facet

I'm trying to remove the x-axis from one plot (the tree on the left should have no x-axis labels, ticks, line, etc.), while keeping the x-axis on the plot on the right (0-60, ticks, label: "Number of G's"). I've unsuccessfully searched through…
SP1
  • 51
  • 6
2
votes
1 answer

Scatter plot x-axis tick labels not showing up

Here is my code: import pandas as pd import matplotlib.pyplot as plt wine = pd.read_csv('red wine quality.csv') wine = wine.dropna() plt.figure() wine.plot.scatter(x = 'pH', y = 'alcohol', c = 'quality', alpha = 0.4,\ cmap =…
Renzzy
  • 25
  • 1
  • 8
2
votes
0 answers

ggplot histogram: specifying the x axis limits make zero values disappear

I am trying to produce a number of histograms, all with the same range for the x-values ranging from 0 to 1E6. For some histograms, however, there are a lot of zeros and the maximum number is only 400. So what I want is a histogram with just one…
Emilia
  • 21
  • 2
2
votes
2 answers

Bar plot only shows the last tick_label

I want to plot random numbers of Bars with matplotlib. I set each tick_label individually but shows only the last one. Which one is correct? using tick_label property or using the plot set_xticks function? import matplotlib.pyplot as plt import…
Mironline
  • 2,755
  • 7
  • 35
  • 61
2
votes
3 answers

Tick labels on a pandas datetime axis are not aligned with the ticks

I've successfully created the code to generate a bunch of charts. However, the x axis labels are slightly offset (to the left) from the x axis tick marks. Dataframe stationId date variable value prefix uom 0 site 1 2016-04-07 pH …
TimW
  • 31
  • 5
2
votes
1 answer

How to rotate x-axis labels

I am trying to rotate the xaxis labels but the xticks function below has no effect and the labels overwrite each other import matplotlib.pyplot as plt import seaborn as sns corrmat = X.corr() plt.xticks(rotation=90) …
Utpal Mattoo
  • 890
  • 3
  • 17
  • 41