Questions tagged [xticks]

For questions related to xticks in matplotlib, seaborn, or pandas plots.

"xticks" refers mainly to a submodule of the python plotting library matplotlib which handels the ticks of the x axis. But this tag is in general not limited to python or matplotlib but can be used whenever one refers to position and appearance of ticks and marks at the axes of a graph.

255 questions
0
votes
0 answers

Create multiple labels for categories on the x-axis using ggplot

I am trying to use a variable to categorize my xtick labels. A typical example of my intended plot is at the bottom left plot in the image below. Creating a different subset where different sticks belong to a different category. I am trying to use a…
0
votes
1 answer

Matplotlib major and minor ticks misaligned when using pandas date_range

I am trying to use pandas date_range in the x-axis of a matplotlib.pyplot graph, while setting years to be the major ticks and months to be the minor ticks (for a timeline plot). I came across a seemingly unexpected behaviour (noticed also as part…
John Karkas
  • 113
  • 1
  • 7
0
votes
0 answers
0
votes
1 answer

How to adjust list interval in xticks?

I have data where I want to plot their timeseries. The FRQ is the column bar and the FILT is the line chart. YEAR FRQ FILT 1960 1 1961 3 1962 1 1.416666667 1963 1 0.916666667 1964 0 0.833333333 1965 1 …
user2543
  • 121
  • 9
0
votes
0 answers

matplolib ticks latex bold with python 3.10

I am struggling with matplotlib and latex font. I would like to have all in bold and in latex style. I have, consequently done as follows: import matplotlib import pandas as pd import matplotlib.pyplot as plt plt.rc('font',…
diedro
  • 511
  • 1
  • 3
  • 15
0
votes
2 answers

Trying to place text in mpl just above the first yticklabel

I am having diffculties to move the text "Rank" exactly one line above the first label and by not using guesswork as I have different chart types with variable sizes, widths and also paddings between the labels and bars. import matplotlib.pyplot as…
CodeTrek
  • 435
  • 1
  • 3
  • 10
0
votes
0 answers

how do i label my bar graph by using xticks

bar graph code Hi ,may i ask how do label all the years in data5_year,under every bar graph
COCO
  • 1
0
votes
1 answer

How to set time intervals on a monthly time series in R ggplot?

My data is like this dep_delay date 1 47 2013-01-01 2 1 2013-01-01 3 1 2013-01-01 ... 36 4 2013-01-02 37 5 2013-01-02 38 11 2013-01-02 ... 911 4 2013-05-15 912 1 …
Bluetail
  • 1,093
  • 2
  • 13
  • 27
0
votes
1 answer

Y-axis ticks in VS Code using Plotly

As my 32 bit Jupyter Notebook isn't reading large CSV file. I started working with VS Code. I have a problem with the graph in VS code. Output graph using VS Code: The Y-axis ticks should be the same as the output graph in Jupyter Notebook. The…
Pavan
  • 1
  • 3
0
votes
0 answers

xticks and bins won't match each other - matplotlib.hist

i'm trying to create simple hist plot, using plt.hist. I encountered a strange problem, as you can see in the figure - the bins just overlap each other. Here is my code: intervals = np.arange(0.5,max(data)+0.5, .5) data = np.array(data) …
Doron bs
  • 11
  • 1
0
votes
0 answers

Mathplotlib xticks not appearing (((

Please help me to understand why the labels don't appear under my chart. It has to appear for example like "2022-11-01", "2022-11-02", "2022-11-03" etc. And if array with dates are too big then it have to automatically show for example like…
Max
  • 1
0
votes
1 answer

How to use xticks and marker functions for smooth line graph - matplotlib

I make a line graph more smooth by applying the following lines of code (based on this post): import matplotlib.pyplot as plt import numpy as np from scipy.interpolate import make_interp_spline #create random data years = list(range(1998, 2021,…
0
votes
0 answers

Tick marks for subplots with shared x-axis disapeared when grid is set False

I tried to find this answer on the forum but I could not. I have made most of my plots with a grid, but this time it is easier to see what I want without a grid. However, the x-ticks disappeared while the y-ticks are still visible. I have tried to…
0
votes
0 answers

How I can hide some x axis labels in seaborn time-series plot?

I'm using sns.scatterplot and sns.lineplot to show my time-series data (1-min interval CO2 concentration). I have almost 1 month datasets which makes the x-axis very packed (since I have 40'000 datapoint). the data starts 2022-05-02 00:00 and ends…
Yunni
  • 15
  • 2
0
votes
2 answers

matplotlib difficult to show all x tick labels

I have a data series hour 0 35845 1 18921 2 14484 3 12504 4 13862 5 14958 6 23328 7 33580 8 66878 9 65291 10 61785 11 64781 12 68799 13 72486 14 83230 15 75487 16 88231 17 85383 18 …