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.

1330 questions
17
votes
1 answer

Curve Fitting to a time series in the format 'datetime'?

Here is my problem: polyfit does not take datetime values, so that I converted datetime with mktime producing the polynomial fit works z4 = polyfit(d, y, 3) p4 = poly1d(z4) For the plot however, I would like the datetime description on the axis…
Corins
  • 171
  • 1
  • 1
  • 3
17
votes
4 answers

Mathematical expression in axis label

In R, I use expression(theta[l]) so that the label of my plot axis is that same as $\theta_l$ from LaTeX. For esthetic reasons, I'd rather like to display $\theta_\ell$. Can you help me? EDIT Before, I did plot(1:10, 1:10,…
Marco
  • 8,498
  • 7
  • 29
  • 46
16
votes
2 answers

How to prevent scales::percent from adding decimal

This started happening a few days ago, that scales::percent would add a decimal place in its labels, and I can't seem to disable this decimal to display integer values on y-axis. library(dplyr) library(ggplot2) mtcars %>% count(cyl) %>% …
Joe
  • 2,225
  • 1
  • 13
  • 29
16
votes
2 answers

Format axis tick labels to percentage in plotly

I am creating bar charts in plotly with y-axis representing percentages or shares within 0-1. The y-axis displays as 0.05 instead of 5.0%. Is there a way to display y-axis tick labels as %##? I have tried using tickformat = "%" but that doesn't seem…
Binny
  • 163
  • 1
  • 1
  • 7
15
votes
3 answers

How can I use a graphic imported with grImport as axis tick labels in ggplot2 (using grid functions)?

I'm hoping I can combine the spiffy importing and drawing powers of grImport with the awesome graphing power of ggplot2, but I simply don't understand the grid system well enough to find an elegant way of achieving what I want. What I want is to…
15
votes
1 answer

Implement continuous date-time labels on x-axis of mpandroidchart

We collect data points at various days throughout the year and want to display them in a chart - the x-axis showing the date. Right now we create an array of length 364 each containing the value for the corresponding day. However, we want the x-axis…
Chris
  • 161
  • 5
15
votes
5 answers

WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers

I am trying to solve the below issue for last couple of days but still not able to resolve it. I have searched lots of forums but all in vain. *Little bit of history: My code was working well in the devp env but for accessing the production sever I…
Rohit
  • 385
  • 2
  • 4
  • 16
15
votes
2 answers

Chart: Show more value descriptions on X-Axis

I'm showing a Chart to the user which has one chart area with a line chart. On this, I got, for example, one line. This line has about 200 values. Those values do all have a description (e.g. "01.01.2013", "05.02.2013" and so on). When the Chart is…
Florian Müller
  • 6,344
  • 25
  • 70
  • 114
14
votes
3 answers

Custom ggplot2 axis and label formatting

I'm trying to draw labels which look informative, clear and tidy. I was following example and raised one more question about label and axis formatting. For example, I have sales data which includes Brand, Categories and Expenditure in EUR. When sum…
AK47
  • 1,148
  • 4
  • 14
  • 30
14
votes
3 answers

How to insert two X axis in a Matlab a plot

I would like create a Matlab figure with a double X axis (m/s and km/h) with the same plot. I have found plotyy and - in Matlab reposity - plotyyy, but I am looking for: A double X axis. Together below the plot. My code is very simple: stem(M(:,…
Giacomo Alessandroni
  • 666
  • 1
  • 14
  • 27
14
votes
2 answers

d3.js Specify text for x-axis

My x-axis currently has numbered ticks. I want the ticks to be replaced with data from my object (specifically the keyword value). How would I accomplish this? I have a working Fiddle var dataset = [ {"keyword": "payday loans", "global":…
EnigmaRM
  • 7,207
  • 9
  • 41
  • 72
13
votes
1 answer

Insert blanks into a vector for, e.g., minor tick labels in R

This question relates generally to a previous SO question concerning the creation of minor tick marks on a ggplot2 axis and specifically to a comment in the answer to that question suggesting a function to insert blanks into a sequence may prove…
adamdsmith
  • 808
  • 9
  • 15
13
votes
1 answer

Format latitude and longitude axis labels in ggplot

I have a ggplot map, for example: library(ggmap) ggmap(get_map()) I'd like the axis labels to be automatically labeled as N-S / W-E: in the above case, for example, instead of lon -95.4 it should show 95.4°E. I have tried to mess with the scales…
AF7
  • 2,561
  • 20
  • 51
13
votes
1 answer

how to subscript the x axis tick label

I generated this graph with the below script. But how could I subscript the "10" in PM10, "2" in SO2, and"2" in NO2? I tried levels(df$variable) <- c("PM[10]","SO[2]", "NO", "NO[2]"), but does not work. Can anyone help? Thank you! variable <-…
cyrusjan
  • 587
  • 1
  • 7
  • 18
13
votes
2 answers

How to change separation between tick labels and axis labels in Matplotlib

My axis labels often look not good (too close to tick labels) when I use Matplotlib. How to set distance between tick labels and axis label? I just need to enlarge distance between "Number of stars" label and corresponding tick labels. Maybe latex…
drastega
  • 1,319
  • 3
  • 26
  • 39
1 2
3
88 89