Questions tagged [axis-labels]
The labels on any axis of a plot
1,503
questions
0
votes
1
answer
7
views
How to stack multiple VegaLite graphs on top of each other
I am trying to recreate a certain graphing tool for my company (I'm an intern getting my BS still). I want to use VegaLite graphs to recreate a graph that is essentially 3 unique graphs stacked ...
0
votes
1
answer
24
views
Adjusting the decimal point precision on a linear matplotlib yscale
In the code below, while using matplotlib and in a simple format, I want to have the y-scale axes numbers show 2, 4, 6, 8, 10. Similar to how the example graph displays the y-axis.
# plot our data ...
0
votes
0
answers
15
views
Hide Labels for X-Axis in GEE
I've created a dataset containing one spectral value for each year (1985 to 2021) and wanted to plot the result using ui.Chart in the GEE. I'd like to know if it is possible, to only label every 5th ...
1
vote
0
answers
25
views
Calculate Axis break positions programmatically where gap is larger than X number of ticks
I have a dataset similar to the picture below with some values that make the smaller portions of graph harder to read. I have been asked to put in an axis breaks when there is any continuous data ...
0
votes
1
answer
31
views
How can I add axis labels to a plot with custom axes?
I want to add axes labels to the plot generated by the following code. Specifically, I would want an x-axis label that reads "Fibril Diameter (nm)" and a y-axis label that reads "...
0
votes
1
answer
28
views
How can you change the starting position of the major axis labels in ggplot2?
How can I change the starting position of a ggplot2 axis label?
Here is my code:
# data - dataframe
# y - string used to get certain column of data frame
graph_data <- function(data, y, title = &...
0
votes
0
answers
81
views
Show D3 legend ticks for decimal domain values
const itemColor = [{
offset: 0.0,
color: "#ff0000"
},
{
offset: 0.1,
color: "#ffff00"
},
{
offset: 0.4,
color: "#00ff00"
},
{
offset: 0.5,
color: "#00ffff"
...
0
votes
0
answers
28
views
common secondary (right) y-axis label on multiple graphs (matplotlib)
I want to plot multiple graphs with same x-, principal and secondary y- axes. I did a simple example below. However, I do not know how to implement a commom secondary (right) y- axis label.
My example:...
0
votes
0
answers
12
views
How to format python matplotlib Time labels for wrap around?
I am working on a tool to print play times of bands. Now some bands will play in the night (or rather very early next day, e.g. 23:45 - 0:30, 0:30 - 1:30), however they should then still be considered ...
1
vote
1
answer
27
views
Why is `ann=FALSE` not working in the boxplot call in R?
Trying to produce both a stripchart and a boxplot of the same (transformed) data but (because the boxplot is shifted down a tad) I don't want the axis labels twice:
set.seed(3121975)
bee = list(x1=...
1
vote
1
answer
43
views
Problem with plot in R: reducing spce within labels and bars, but x axis ticks disappear
I have the following code with its corresponding plot:
ggplot(df2, aes(x=Fecha.inicio, xend=Fecha.final, y=Ministro.a, yend=Ministro.a, color=Presidente)) +
theme_minimal()+ #use ggplot theme with ...
6
votes
1
answer
108
views
ggplot new scale_x function failing to work correctly
In order to get rid of non-trading days of stocks (aka weekends) in ggplot instead of the date, I use the number of rows in the data and then add breaks and labels. The code below "works" ...
0
votes
0
answers
39
views
Retrieve plotly downsampled tick labels from the htmlwidget
This question follows this post.
I want to add horizontal lines to an R plotly heatmap that will be located between several of the heatmap's rows.
The problem is that the heatmap rows are character ...
0
votes
0
answers
10
views
Matpotlib matshow: Every second axis label is not displayed
My Problem:
When displaying a matrix, only half of my labels (on the x and y axis) are displayed. Picture here
My Goal
Show every month on the y axis and every variable on the x axis.
My Code:
months =...
1
vote
1
answer
67
views
How to reorder categories on ggplot2 axis
I am trying to reorder categories on my ggplot2 axis so that they are in the order Dark, Medium, Light instead of in alphabetical order.
I have tried to reorder them, and the bars show the correct ...
1
vote
1
answer
31
views
label X axis on ggscatter
I have a dataframe with 2 columns to do a correlation. The data is of integer number from 1 to 10.
However, when I use the ggscatter, the axis (X and Y) uses a scale of 0, 2.5, 5, 7.5 and 10. I want ...
0
votes
1
answer
32
views
How do I move axis labels closer together in Stata graph?
I'm creating an rcap graph in Stata and running into issues with the x-axis labels. No matter what I try, the labels fall outside the graph.
I want to push the labels (and the CI bars) closer together ...
0
votes
1
answer
40
views
Why does ggplot suddenly change formate of y-axis numbers to exponential?
I found various posts solving the issue to change the y-axis from exponential back to a noraml decimal:
avoid scientific notation x axis ggplot
How do I change the formatting of numbers on an axis ...
0
votes
1
answer
31
views
Adjusting position of colorbar tick labels in ggplot2
I'm trying to slightly reposition the labels of a discrete colorbar so that they don't overlap, without changing the values of the breaks themselves. In the below plot, the two center labels (...
0
votes
0
answers
31
views
R - keeping the leading zero in a subscript label
The leading zero in a x-axis label will be removed, when it has a subscript part.
How can it be retained?
Thank you.
library(ggplot2)
ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) +
geom_boxplot()...
0
votes
0
answers
24
views
How to color-code columns in MATLAB Clustergram?
I am trying to label specific columns in a MATLAB cluster gram with particular colors to indicate similarities between columns. I am aware of the ColumnGroupMarker function, but I do not want them ...
0
votes
1
answer
41
views
Axis interpretation in 3D Numpy arrays
I am using the following example to understand the working of axis in 3D arrays in Numpy.
a = np.array([[9],[9],[8]])
b = np.array([[1],[4],[6]])
print(np.stack([a,b],axis=0)
>>>
array([[[9]...
0
votes
2
answers
26
views
How can we remove x axis labels post drilldown in highcharts?
I want to have x axis labelled before drilling down but as soon as a user drills down the x axis labels should not be visible anymore. How can I implement?
0
votes
0
answers
108
views
Is it possible to display the label of each bar outside the upper bound of a bar chart using react-apexcharts?
I am editing a bar chart that should display the values above each bar. I need the values to be displayed outside the upper limit of the chart. I managed to get this graph:
chart i have
However, I ...
0
votes
0
answers
24
views
Plotly Bar Chart Axes
Im trying to create a simple bar chart and deploy it within a dropdown menu. My problem is with the axes. I do not know why when I use px.bar the deploy just take one variable (x or y) and make the ...
1
vote
0
answers
61
views
Remove degree markers in matplotlib plot
I have created a spider plot with matplotlib but I can't figure out how to get rid of the degree markers that is overlapping the label text I have added. I am having to use matplotlib v3.2.1 due to ...
0
votes
1
answer
19
views
seaborn subplot x-axis labels not rotating
I'm trying to show 2 subplots with x-axis labels rotated 90 degrees. The first subplot's labels for some reason are not rotating. Can anyone let me know what I'm missing? Thanks!
fig, ax = plt....
0
votes
0
answers
46
views
Changing X-Axis labels from numbers to characters
Right now I have a graph that is displaying the months as numbers 01,02, …, and I would like to change them into the actual month name. I used this code but get a discrete value error each time.
...
1
vote
2
answers
106
views
customize x axis label placement in ggplot + coord_polar
I'm using coord_polar to show changes in species abundance over time as a clock plot as shown below
year<-c(2017, 2018, 2019) # observation dates
sp1<-c(39,55,85)
sp2 <-c(100, 75, 65)
sp3 <...
0
votes
1
answer
32
views
Substituting X-axis ticks and text with percentile rank in ggplot
I am currently trying to reproduce the following graph:
Plot to be replicated
What I am struggling with is substituting the x-axis ticks and text to be the percentile rank rather than the country ISO (...
0
votes
0
answers
23
views
Conditional Formatting of Axis Label Names
I have a bar chart where I need to do conditional formatting for the colours of the axis label names. eg. If Axis.Labels.Names from Table_1 = Axis.Labels.Names from Table_2 then Label text colour = ...
0
votes
1
answer
30
views
Multi-row x-axis labels with breaks in R
I would like to add 2-row x-axis labels on my line plot, but not sure how to also incorporate the continuous labels and breaks I have for my 1st x-axis (Column "CYR" - short for calendar ...
0
votes
2
answers
55
views
Add space or break between every second label on x-axis ggplot
How can I add a space or break between every second label on the x-axis in ggplot, to introduce some distance between each set of platforms (FB, IG, and TW)?
If I try adding blank rows to the ...
0
votes
0
answers
111
views
ggplot2 increase font size of output labels
I am working with ggplot2 to create plots and I want to increase the size of the labels from the output, so not the labels added manually.
I tried to use cex put this works only partially as it only ...
0
votes
0
answers
26
views
vb.net chart: How to get AxisX.CustomLabels in sync with AxisX.MajorTickMark
As shown in the code, I get CustomLabels displayed, but they are not on the MajorTickMarks defined in the ChartArea. How do I get this in sync?
vb.net
Dim from_X, to_X As Date
from_X = myClass....
0
votes
0
answers
23
views
Y axis label not printed while using Layout / matrix in R
I am trying to create multiple plots in a single layout in R.
I have attached my code herewith.
I have 2 questions:
when I plot this Y-axis label is not printed in the plot. I played around with mar ...
0
votes
1
answer
33
views
What am I doing wrong? Relabeling x axis tick marks
This is my first question on stackoverflow. I'm a longtime lurker, and hopefully this is comprehensibly written. So, I've already browsed here for answers and have incorporated these suggestions into ...
0
votes
0
answers
22
views
X axis labels in time series representation (PLOT.TS)
I am trying to change the x-axis labels to actual dates for my time series representation that I performed using plot.ts instead of ggplot2. When using the code below, it generates a graph with the ...
0
votes
0
answers
14
views
My altair labels are cut off - how can I see the whole label? [duplicate]
When I increase the width of the chart, it only increases the width of the bars part, not the labels. I want to see the whole label. Is there a way to give more room to the labels on the side?
2
votes
1
answer
70
views
Plotting a 4 axis graph with a variable in each axis
I´m looking to make a graph that looks like this:
in R.
The basic idea is to have a variable on each axis and graph the interactions between those variables, is there any way to connect the axis of ...
0
votes
1
answer
41
views
Creating axis gap in histograms
I'm trying to create a gap in a histogram between 0.6 and 1 (on the y axis) but don't really know how to go about this. The gap.barplot solution does not seem to work and i'd love to keep the ...
0
votes
1
answer
62
views
Matplotlib/seaborn heatmap with a datetime x-axis shows 1970 instead of real datetime with AutoFormatter
I have a heatmap produced with the following pivot table:
HCpredictedLabel B H R
datetime
2021-07-20 09:00:00 115.0 80.0 119.0
2021-07-20 09:05:00 ...
2
votes
1
answer
109
views
Force y axis to start at 0 and still use automated labeling
I have a plot whose y min starts well above 0. But I want to include 0 as the min of the y-axis and still have Stata automatically create evenly-spaced y-axis labels.
Here is the baseline:
sysuse ...
0
votes
0
answers
27
views
How to add .text that corresponds to array index in a scatter plot? Python
I have an array of decoded data that that corresponds to an original array of images. I want to know which point in the scatter plot corresponds to which image (or the decoded array index). I was ...
1
vote
1
answer
40
views
Fixing tick labels/grid lines with a date/time plot in base R using lubridate()
I apologize that this isn't question isn't clean - I don't know how make this into a good reproducible example.
I have a base R plot where I'm trying to do two things: get clean axis labels on the ...
0
votes
0
answers
33
views
Relabelling continuous y-axis values using ggplot
I have a continuous y-axis that needs values relabelled into time on a 12-hour AM/PM clock. I would prefer not to change the actual variable into time because that would make the statistics ...
0
votes
1
answer
30
views
How can I write axis ticks in small capital using ggtext?
I want to write axis ticks in small capital using ggtext::element_markdown(). However, an attempt like <span class='font-variant: small-caps'>small capital here!</span> is in vain. Then, ...
1
vote
0
answers
45
views
Hinder overlapping axis labels in plot3D
I am supposed to do 3d barplot and I found this peace of code where I added axis labels. I get the following plot:
The problem is that the axis tick mark labels and axis labels overlap. How can we ...
0
votes
0
answers
183
views
Add value labels to stacked bar chart
Last update: I figured it out by looking at a million different stackoverflow posts.
To turn off the scientific notation for tick labels, I added:
ax.ticklabel_format(useOffset=False,style='plain')
...
2
votes
1
answer
37
views
Error with subscript within list of axis labels
I have a list of axis labels for various water properties. Some have chemical formulae that need subscript. However, I keep getting an error of: non-numeric argument to binary operator.
This is the ...