How can I make the y axis ticks of my plot increase by multiples of 10? [duplicate]
up vote
0
down vote
favorite
This question already has an answer here:
Transform only one axis to log10 scale with ggplot2
4 answers
ggplot scale_y_log10() issue
1 answer
I would like to make the y axis of my histogram increase by multiples of 10 in ggplot2.
I want the values to be displayed on the y axis to be:(1, 10, 100, 1000,...1000000)
However, when I use the following code:
scale_y_continuous(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
The values on the y axis are not equally spaced! See attached image:
How can I make these values to be equally spaced on the y axis using ggplot2?
Thank you! (data are not relevant here, just the y axis ticks)
r ggplot2
New contributor
marked as duplicate by Rui Barradas, phiver, zx8754
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 19 at 20:09
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
0
down vote
favorite
This question already has an answer here:
Transform only one axis to log10 scale with ggplot2
4 answers
ggplot scale_y_log10() issue
1 answer
I would like to make the y axis of my histogram increase by multiples of 10 in ggplot2.
I want the values to be displayed on the y axis to be:(1, 10, 100, 1000,...1000000)
However, when I use the following code:
scale_y_continuous(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
The values on the y axis are not equally spaced! See attached image:
How can I make these values to be equally spaced on the y axis using ggplot2?
Thank you! (data are not relevant here, just the y axis ticks)
r ggplot2
New contributor
marked as duplicate by Rui Barradas, phiver, zx8754
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 19 at 20:09
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3
You'd needscale_y_log10(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
I suppose. But the outcome might need further adjustment, see ggplot scale_y_log10() issue
– markus
Nov 19 at 12:33
You can also add alabels=scales::comma
parameter to thescale_
function call to get better formatting
– hrbrmstr
Nov 19 at 13:11
Thank you @markus. It works this way!
– RacktheMan
Nov 19 at 13:51
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Transform only one axis to log10 scale with ggplot2
4 answers
ggplot scale_y_log10() issue
1 answer
I would like to make the y axis of my histogram increase by multiples of 10 in ggplot2.
I want the values to be displayed on the y axis to be:(1, 10, 100, 1000,...1000000)
However, when I use the following code:
scale_y_continuous(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
The values on the y axis are not equally spaced! See attached image:
How can I make these values to be equally spaced on the y axis using ggplot2?
Thank you! (data are not relevant here, just the y axis ticks)
r ggplot2
New contributor
This question already has an answer here:
Transform only one axis to log10 scale with ggplot2
4 answers
ggplot scale_y_log10() issue
1 answer
I would like to make the y axis of my histogram increase by multiples of 10 in ggplot2.
I want the values to be displayed on the y axis to be:(1, 10, 100, 1000,...1000000)
However, when I use the following code:
scale_y_continuous(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
The values on the y axis are not equally spaced! See attached image:
How can I make these values to be equally spaced on the y axis using ggplot2?
Thank you! (data are not relevant here, just the y axis ticks)
This question already has an answer here:
Transform only one axis to log10 scale with ggplot2
4 answers
ggplot scale_y_log10() issue
1 answer
r ggplot2
r ggplot2
New contributor
New contributor
edited Nov 19 at 13:09
hrbrmstr
58.4k584143
58.4k584143
New contributor
asked Nov 19 at 12:26
RacktheMan
84
84
New contributor
New contributor
marked as duplicate by Rui Barradas, phiver, zx8754
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 19 at 20:09
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Rui Barradas, phiver, zx8754
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 19 at 20:09
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3
You'd needscale_y_log10(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
I suppose. But the outcome might need further adjustment, see ggplot scale_y_log10() issue
– markus
Nov 19 at 12:33
You can also add alabels=scales::comma
parameter to thescale_
function call to get better formatting
– hrbrmstr
Nov 19 at 13:11
Thank you @markus. It works this way!
– RacktheMan
Nov 19 at 13:51
add a comment |
3
You'd needscale_y_log10(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
I suppose. But the outcome might need further adjustment, see ggplot scale_y_log10() issue
– markus
Nov 19 at 12:33
You can also add alabels=scales::comma
parameter to thescale_
function call to get better formatting
– hrbrmstr
Nov 19 at 13:11
Thank you @markus. It works this way!
– RacktheMan
Nov 19 at 13:51
3
3
You'd need
scale_y_log10(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
I suppose. But the outcome might need further adjustment, see ggplot scale_y_log10() issue– markus
Nov 19 at 12:33
You'd need
scale_y_log10(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
I suppose. But the outcome might need further adjustment, see ggplot scale_y_log10() issue– markus
Nov 19 at 12:33
You can also add a
labels=scales::comma
parameter to the scale_
function call to get better formatting– hrbrmstr
Nov 19 at 13:11
You can also add a
labels=scales::comma
parameter to the scale_
function call to get better formatting– hrbrmstr
Nov 19 at 13:11
Thank you @markus. It works this way!
– RacktheMan
Nov 19 at 13:51
Thank you @markus. It works this way!
– RacktheMan
Nov 19 at 13:51
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
3
You'd need
scale_y_log10(breaks = c(1,10,100, 1000, 10000, 100000, 1000000))
I suppose. But the outcome might need further adjustment, see ggplot scale_y_log10() issue– markus
Nov 19 at 12:33
You can also add a
labels=scales::comma
parameter to thescale_
function call to get better formatting– hrbrmstr
Nov 19 at 13:11
Thank you @markus. It works this way!
– RacktheMan
Nov 19 at 13:51