Questions tagged [axis-labels]

The labels on any axis of a plot

The labels on any axis of a plot. For example, the x and y axis labels of a 2D plot.

Use this tag for problems regarding the typography, visibility, layout, and/or placement of the axis labels in your plot.

1631 questions
0
votes
1 answer

Column Chart with DateTime on AxisX Displays wrong Dates

I created a column chart and I simply don't get the labels on the X-axis right. Here is a screenshot of my chart. I added a line at the bottom of the screenshot to show how I expect it to be. Here is my code: private void Form1_Load(object sender,…
Konstantin
  • 461
  • 1
  • 5
  • 13
0
votes
1 answer

Matplotlib apply xaxis and yaxis number formatting

Why is my xaxis not formatted as a date? I expect it to because I am setting the dataframe index to a datetime index. How do I make all subplots share the same xaxis? The reason I am currently using add_subplot instead of plt.subplots is because I…
Jarad
  • 17,409
  • 19
  • 95
  • 154
0
votes
1 answer

How to set the axis scale and ticklabels using matplotlib object oriented API

I would need some help with plotting in Matplotlib.pyplot under Python2.7! I want to generate a plot with the following x-axis: x-axis as it should be I got so far by using myaxis.set_xticks([0,0.5,1,2,4,6,8]) and it looks good, but if I want to…
firefly2517
  • 115
  • 2
  • 15
0
votes
1 answer

Integer tick labels matplotlib, no origin tick labels

I have code (code follows), which uses matplotlib and numpy to create a diagram. I have the following requirements for my plot: I want the axes to have integer ticks. The axes ticks shall not have trailing zeros, so for example there should not be…
Zelphir Kaltstahl
  • 5,722
  • 10
  • 57
  • 86
0
votes
1 answer

Align xticks on top of axes with bars in matplotlib

I have the following bar graph. I want the xticks on the x-axis on top of the graph to align with the bars. So rather than spacing [105, 20, 75, ...] evenly, I want them spaced so that 105 is above the first bar, 4 is above the last bar, etc. How…
pushkin
  • 9,575
  • 15
  • 51
  • 95
0
votes
1 answer

Error in customizing the x axis with scale_x_discrete() in ggplot2

I have the following figure: That came from this working piece of code: ggplot(plot, aes(x=variable, y=value, colour=Species, group=Species)) + geom_line() + geom_point() + facet_grid(. ~ Treatment) + theme_bw() + theme(axis.text.x =…
TWest
  • 765
  • 2
  • 6
  • 27
0
votes
1 answer

Display imagesc with custom values on x- and y-axis

I'm using MATLABS function imagesc to plot a 6x6 matrix of doubles. This is the plot I get: What I want to do is change the values on the x- and y-axis to values that I choose myself. For example, I want to replace the values 1-6 with my own…
maxala
  • 67
  • 1
  • 6
0
votes
1 answer

Matplotlib table and chart overwrites next chart

I started with this issue chart and table and the solution does put the table under the chart. However the second part of the question is to use this with multiple charts on the same (printed) page. Taking the answer from the previous question and…
cryptoref
  • 413
  • 1
  • 7
  • 17
0
votes
0 answers

Pass function argument to ggplot label

I'm relatively new to ggplot and R, and am trying to write a small function to make it easy to run the same code for multiple bird species, denoted by the species code in the function argument. I want to use a single argument as both the y-axis data…
JMDR
  • 121
  • 1
  • 8
0
votes
1 answer

R - add labels to the middle of barplot with multiple bars

I try to draw plot with several rows of bars using barplot. x11() X=c('May','July','September','November') Y1=c(1,1,3,5) Y2=c(5,5,6,7) Y3=c(9,8,0,2) C=rbind(Y1,Y2,Y3) l <- c() a=b=l i <- 1 while(i<=length(X)) { a[[i]] <- '' b[[i]] <- X[i] i <- i…
John_West
  • 2,239
  • 4
  • 24
  • 44
0
votes
0 answers

R axis.POSIXct() at 10 minute intervals?

I want to plot a time series with a mark on the x-axis every 10 minutes. Like: 09:10 09:20 09:30 09:40 09:50 10:00 10:10 10:20 and so on. Signal was sampled at 10 Hz sampling frequency. My data frame column df$t is class "POSIXct" "POSIXt". I…
0
votes
1 answer

Shift tick label in 3D plot in python

In my figure it is not immediately clear to which dash at the axis my values belong, it needs a closer look. I want it to be clear right away. Now I have added in red to which they belong. When the values are shifted a little bit upwards I think it…
Henry
  • 25
  • 6
0
votes
1 answer

Specifying different axis labels between facets

I would like to specify the breaks and colors for two facets independently. Is there a way to do this? Using this code ggplot(data, aes(x = x, y = y)) + geom_point() + scale_y_continuous(breaks = c(0:3, 4, 6, 8)) + facet_wrap(~group,…
saladi
  • 3,103
  • 6
  • 36
  • 61
0
votes
2 answers

Adjust x-axis breakpoint years for hist.Date

I'd like to make some meaningful histograms of observations for each year. For example, here are a few dates in 1970 and 1971 (near the Unix epoch): dates <- as.Date(c("1970-01-01", "1971-08-16", "1971-12-31")) d <- hist(dates, "years",…
Mike T
  • 41,085
  • 18
  • 152
  • 203
0
votes
1 answer

Subscript in simple base R graph using mtext

Take a very simple example. x <- 1:10 plot(x) mtext(paste("Test n=",length(x),""), side=3) We generate a simple plot. Now lets say I want to include a subscript x between the n and the =. I think I need to use expression, but I cant get the correct…
lukeg
  • 1,327
  • 3
  • 10
  • 27