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
7
votes
1 answer

How to edit the ticks in jointplot or JointGrid

How can I change the tick placement in a seaborn jointplot or JointGrid? I'm looking for something similar to matplotlib's plt.xticks.
user3600497
  • 1,621
  • 1
  • 18
  • 22
5
votes
1 answer

How to increase the size of xticks in pandas plot

This is a follow up for a question which i asked here: The code is as follows: from pandas_datareader import data as web import matplotlib.pyplot as plt import matplotlib.dates as md fig, (ax1, ax2) = plt.subplots(2, 1) df = web.DataReader('F',…
Slartibartfast
  • 1,058
  • 4
  • 26
  • 60
5
votes
2 answers

How to show specific intervals of tick labels while maintaining the ticks

I'm currently trying to plot a figure with a lot of ticks. It has ticks for each value from 0 to 50 resulting in packed tick labels that are merged making the plot quite messy. I made the ticks using fig, ax =…
Cody Chung
  • 629
  • 1
  • 6
  • 15
5
votes
1 answer

Arguments for LogLocator

In MatPlotLib, I want to plot a graph with a linear x-axis and a logarithmic y-axis. For the x-axis, there should be labels at multiples of 4, and minor ticks at multiples of 1. I have been able to do this using the MultipleLocator class. However, I…
Karnivaurus
  • 22,823
  • 57
  • 147
  • 247
4
votes
1 answer

How to rotate the xticks with seaborn.objects

By chance, is there a way to rotate the xticks in the graphic below (just to make it a bit more readable)? The usual sns.xticks() doesn't work in the new seaborn.objects development (which is amazing!) tcap.\ assign(date_time2 =…
Robert Chestnutt
  • 302
  • 3
  • 13
4
votes
1 answer

Moving the x-axis and y-axis ticks in Plotly Python

I'm trying to create the four cartesian quadrants through plotly. I'm unable to move the ticks to x=0, and y=0. I'm unable to figure out how. import plotly.graph_objects as go fig = go.Figure() fig.add_trace(go.Scatter(x=[0, 1, 2, 3, 4], y=[-4,-4,…
Hemanshu Das
  • 243
  • 4
  • 12
4
votes
2 answers

How can I mark xticks at the center of bins for a seaborn distplot?

I want to plot a distplot using seaborn with xticks at the mid point of the bins. I am using the below code: sns.distplot(df['MILEAGE'], kde=False, bins=20)
dododips
  • 91
  • 1
  • 6
4
votes
2 answers

Plotly: How to set xticks for all subplots?

I am unable to manipulate the xticks on all of my subplots. The method for xticks that I am using (as per documentation) changes the xticks of only the top-most subplot. How can I change the xticks for the lower subplot as well? Below is my…
rmore911
  • 195
  • 2
  • 13
4
votes
1 answer

How to put the scaling on the ticks in ternary plot instead of x and y axis

I am try to work out with my atomic composition with ternary phase diagram, here is my picture I wish to put my scale to the ticks on the ternary phase diagram (i.e. those triangular axis) instead of x and y axis. Is there a ways to put the scale…
4
votes
2 answers

Modify major and minor xticks for dates

I am plotting two pandas series. The index is a date (1-1 to 12-31) s1.plot() s2.plot() pd.plot() interprets the dates and assigns them to axis values as such: I would like to modify the major ticks to be the 1st of every month and minor ticks…
ctd25
  • 730
  • 1
  • 11
  • 22
3
votes
3 answers

GNU Octave Matlab: Plot tick labeling

I am making a frequency plot and I would like some help on tick labeling. Here is what I have: semilogx([200,1000,5000], [0,6,0]); xlim([20 20000]); sc = [20:10:100,125:25:175]; scale = [sc,sc*10,sc*100,…
lucullus
  • 187
  • 1
  • 11
3
votes
1 answer

How can I get xticks to have a monthly interval instead of daily on my matplotlib plot

I have a dataframe with the index as datetime. There are duplicate indices. Here is the df.head() Landing Date Boat Trip Type Anglers ... Albacore Barracuda Total Caught Date …
user58008
  • 73
  • 7
3
votes
0 answers

Axis, ticks and label not aligned for third xaxis using twiny()

I want to have three horizontal axis and for each axis the ticks and labels should be right next to their respective axis. My attempt: import matplotlib.pyplot as plt import numpy as np T = range(30,60) Q1 = range(100,400,10) fig =…
mangoon
  • 31
  • 2
3
votes
0 answers

Forcing Scientific Notation and limit Decimals in Matlplotlib using ScalarFormatter

I have a plot that accepts data with huge differences in scale. To keep the axes clean I am forcing scientific notation so digits don't run off the figure. To do this, I am using ScalarFormatter and adjusting the ticklabel_format like…
Marshall
  • 33
  • 4
3
votes
3 answers

Changing axis ticks in Matplotlib with multiple connected Boxplots

I am plotting a convergence graph and to show deviations from the mean I am using connected boxplots: For some reason Matplotlib forces ticks for each boxplot and I cannot seem to get them removed. My code for the current plot looks something like…
AverageJoe
  • 45
  • 1
  • 5
1
2
3
16 17