Displaying 20 results from an estimated 1000 matches similar to: "[R] Suppressing scientific notation on plot axis tick labels (PR#14203)"
2010 Feb 02
1
[R] Suppressing scientific notation on plot axis tick labels (PR#14202)
On 02/02/2010 6:20 AM, Dimitri Shvorob wrote:
> Ruben Roa has kindly suggested using 'scipen' option - cf.
>
>> fixed notation will be preferred unless it is more than ???scipen??? digits
>> wider.
>
> However,
>
> options(scipen = 50)
> x = c(1e7, 2e7)
> barplot(x)
>
> still does not produce the desired result.
This is strange. I see what
2010 Feb 02
2
Suppressing scientific notation on plot axis tick labels
Is there a better alternative to
x = c(1e7, 2e7)
x.lb = c(0,1e7,2e7)
s.lb = format(x.lb, scientific = FALSE, big.mark = ",")
barplot(x, yaxt = "n", ylab = "")
axis(side = 2, at = x.lb, labels = s.lb)
(I am sure there is a better alternative to line 2 :)).
Thank you.
--
View this message in context:
2003 May 02
2
Suppressing Scientific Notation
R gurus,
Every so often(*) someone asks how to suppress scientific notation in
printing, so I thought I'd give it a shot, but I need some help.
The formatting decision is made(**) on line 286 of src/main/format.c :
if (mF <= *m) { /* IFF it needs less space : "F" (Fixpoint) format */
where mF is the number of characters for "normal" printing and *m is the number
2009 Dec 15
1
Supressing Scientific Notation
I'm trying to display my deciles without scientific notation, but have not found an option that will allow me to do so. According to web searches, the options(scipen=999) should remove scientific notation, but it seems not too. Does this option work with quantcut function? Is there any other option that can be used? I am using verison 2.10.0.
library(gtools)
library(gdata)
2010 Sep 27
1
scientific vs. fixed notation in xyplot()
Hi I am using xyplot() to plot on the log scale by using scale=list(log=T)
argument. For example:
xyplot(1:10~1:10, scales=list(log=T))
But the axis labels are printed as scientific notation (10^0.0, etc), instead of
fixed notation. How can I change that to fixed notation?
options(scipen=4) doesn't work on xyplot()
Thanks
John
2011 Oct 14
1
is there an option to "turn off" scientific notation in write.csv
Dear Help-Rs,
I'm working with a file that contains large numbers and I need to export them "as is". for example take:
x <- c(27104010002005,27104020001805,27104090001810,90050013000140,90050013000120)
y <- c(1:5)
df <- data.frame(cbind(x,y))
When I then try a simple:
write.csv(df,file="df.csv")
I get:
x y
1 2.7104E+13 1
2 2.7104E+13 2
3 2.71041E+13 3
2019 Mar 22
0
prettyNum digits=0 not compatible with scientific notation
Thank you, Robert for raising this here !
>>>>> Robert McGehee
>>>>> on Thu, 21 Mar 2019 20:56:19 +0000 writes:
> R developers,
> Seems I get a bad result ("%#4.0-1e" in particular) when trying to use prettyNum digits=0 with scientific notation. I tried on both my Linux box and on an online R evaluator and saw the same problem, so
2019 Mar 22
0
prettyNum digits=0 not compatible with scientific notation
>>>>> peter dalgaard
>>>>> on Fri, 22 Mar 2019 17:30:19 +0100 writes:
> FWIW, it doesn't seem to be happening on Mac OS:
>> format(2^30, digits=0)
> [1] "1.e+09"
>> prettyNum(12345.6, digits=0)
> [1] "1.e+04"
> A glibc misfeature?
It seems (and note we are talking about format.default()
2019 Mar 21
3
prettyNum digits=0 not compatible with scientific notation
R developers,
Seems I get a bad result ("%#4.0-1e" in particular) when trying to use prettyNum digits=0 with scientific notation. I tried on both my Linux box and on an online R evaluator and saw the same problem, so it's not limited to my box at least. I see the problem in both R 3.5.3 and R 3.3.2.
options(scipen=-100)
prettyNum(1, digits=0)
[1] "%#4.0-1e"
prettyNum(2,
2010 Aug 10
1
axis labels defaulting to scientific notation
The labels on the x-axis are defaulting to scientific notation no matter
how small cex.axis is. How can I override scientific notation to get the
labels to print out as specified? Here is the code (UNIT here is
0.0105):
plot(xm,yv,log="xy",ylim=c(0.1,20)/UNIT,xlim=c(0.004,20)*UNIT,xaxt="n",t
ype="n")
axis(1,
2003 Jan 31
1
Scientific Notation on tick marks
Hi, I was working on a project for my class and I am trying to make sure the y-axis numbers NEVER convert automatically to scientific notation. Is there anything I can set in the plot function to make sure of this?
I know formatC( ) can be used in the axis function, but it seems to give me an error when using it in the plot function.
Thanks,
student-in-need-of-some-help
2019 Mar 22
2
prettyNum digits=0 not compatible with scientific notation
FWIW, it doesn't seem to be happening on Mac OS:
> format(2^30, digits=0)
[1] "1.e+09"
> prettyNum(12345.6, digits=0)
[1] "1.e+04"
A glibc misfeature?
-pd
> On 22 Mar 2019, at 10:10 , Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>
> Thank you, Robert for raising this here !
>
>>>>>> Robert McGehee
2006 Apr 28
1
displaying numbers not in scientific notation
Sorry for asking such a simple question, but I couldn't find the
answer through a search...
How can I get R to show me the values of estimates *not* in scientific notation?
When I use summary() after using lm() I am getting numbers like
4.485107e-01, when what I want to see is 0.4485....
Thanks,
Brian
2007 Sep 26
3
Scientific Notation
Dear List:
Below is how I specify an axis:
axis(2, at=c(0.00005, 0.0005))
R displays the numbers in scientific notation. What
argument/parameter should I use to tell R to display the numbers as
specified rather than in scientific notation?
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major
2005 Sep 21
2
controlling usage of digits & scientific notation in R plots; postscript margins
Dear R users:
I assigned students to make some graphs and I'm having trouble answering
some questions that they have. We are all working on R 2.1 on Fedora
Core Linux 4 systems.
1. In the plot, the axis is not labeled by "numbers", but rather
scientific notation like "-2e+08" or such. We realize that means
-200,000,000. We want to beautify the plot. We would rather
2007 Jun 08
2
overplots - fixing scientific vs normal notation in output
Moving from S-plus to R I encountered many great features and a much
more stable system.
Currently, I am left with 2 problems that are handled differently:
1) I did lots of "overplots" in S-Plus using
par(new=T,xaxs='d',yaxs='d') to fix the axes
->What is the workaround in R ?
2) In S-Plus I could fix "scientific notation" or "normal notation" in
2008 Dec 02
1
Suppressing tick labels?
I am trying to suppress the tick labels on the x-axis of the following:
barchart(richness[Wood=="V"]~Sample[Wood=="V"])
I have tried col.axis="white"
I have tried removing the axis all together with axes=FALSE
I have tried xaxt="n"
I have also tried labels=c"(label1", "label2") to replace the default
labels, based on reading that the
2008 Jun 16
2
in axis() suppressing axis line but keeping tick marks
I've been trying to figure out a parameter that will let you separately
adjust the parameters for the axis line from the tick mark.
In the following example, I would like to suppress the axis line, but keep
the tick marks.
Thanks,
Andrew
foo <- data.frame(x=1:3, y=4:6)
plot(foo$x, foo$y, type="n", axes=F)
points(foo$x, foo$y)
axis(side=1, at=foo$x, lty=0) #would like to figure
2011 Jul 09
1
Suppressing the labelling of tick marks on ggplot2
Hi,
I have the follow ggplot2 code I am running:
ggplot(data=bb.res.math,aes(x=factor(id.bb),y=bb.math.comb,fill=BB)) + geom_bar() + facet_grid(BB~.) + scale_fill_brewer(pal="Set1") + ylab("Average Student Residual (Math)") + xlab("Student ID")
The number of unique id.bb is 2207 and so my X-axis has a couple of thousands, indistinguishable tick marks that correspond
2018 Oct 09
0
bug with OutDec option and deferred_string altrep object
Thanks for the report. The approach you outlines below should work --
I'll look into it.
Best,
luke
On Mon, 8 Oct 2018, Michael Sannella wrote:
> While implementing R's new 'altrep' functionality in the TERR engine,
> I discovered a bug in R's 'deferred_string' altrep object: it is not
> using the correct value of the 'OutDec' option when it expands