Displaying 20 results from an estimated 10000 matches similar to: "hist() with horiz=TRUE does not give horiz. plots (PR#372)"
2012 Oct 05
1
avoid <<- in specific case
Hi all,
I improved a function drawing horizontal histograms (code below) which uses barplot and works fine.
It does,however, need to assign a function to the global environment to later find the actual location on the vertical axis, and not the number of bars used by barplot.
Hopefully, running the examples below will illustrate that.
As said, it works perfectly fine and does exactly what I
2006 Sep 28
3
complex plots using layout()
Dear r-help,
I am trying to plot several scatter plots with marginal histograms on
one page. Ideally, a page is equally divided into 4 figure regions.
Within each figure region, a scatter plot with marginal histograms will
be plotted.
I followed Dr. Paul Murrell's code released online to successfully plot
the scatter plot with marginal histograms. The code applies "layout()"
to
2007 Oct 25
4
ploting labels on barplot
Again me.
 
I want to plot the numbers on the bars of a barplot.
This can be done using hist function when setting the label argument true
(i.e. 
 
data <- c(1,2,3,4)
hist(data,  labels=T) 
 
When I try this using barplot I get an error:
 
>     barplot(summary(data), labels=T)
Error in axis(if (horiz) 2 else 1, at = at.l, labels = names.arg, lty =
axis.lty,  : 
        formal
2010 Sep 21
5
Combined plot: Scatter + density plot
Hi,
in order to save space for a publication, it would be nice to have a
combined scatter and density plot similar to what is shows on
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=78
I wonder if anybody perhaps has already developed code for this and is
willing to share. This is the reproducible code for the histogram
version obtained from the site:
def.par <-
2002 May 13
3
Histograms rotated, side-by-side
Hi there,
I am wanting to create 8 side-by-side histograms which have been rotated 90
degrees clockwise from how they usually sit.. all with the same scales.  Is
someone able to help me out?
Thanks so much,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2017 Jun 14
2
Plot MArginal distribution in the correct place
Please can you send me some orientation?
Many thanks in advance.
Only if posible one book o similar example to understand why it is not what
I try.
El 8 jun. 2017 7:50 PM, "Pedro p?ramo" <percentil101 at gmail.com> escribi?:
> Many thanks Jim.
>
> What I,m trying to show with the fhist plot is the empirical distribution
> of the values of the left plot simulation.
2017 Jun 08
0
Plot MArginal distribution in the correct place
Many thanks Jim.
What I,m trying to show with the fhist plot is the empirical distribution
of the values of the left plot simulation.
You say:
However, I don't think that this plot illustrates quite what you think it
does.
Can you give me a clue to try to illustrate better if it is not showing
what I believe it shows a better way to show it?
Many thanks in advance.
El 7 jun. 2017
2017 Jun 07
2
Plot MArginal distribution in the correct place
Hi Pedro,
As a one-off, you just shove the coordinates around a bit:
par(mar=c(11,0,6,6))
barplot(fhist$counts,axes=FALSE, space=0,horiz=TRUE,col="lightgray",
 ylim=c(0,24))
However, I don't think that this plot illustrates quite what you think it does.
Jim
On Wed, Jun 7, 2017 at 4:01 PM, Pedro p?ramo <percentil101 at gmail.com> wrote:
> Please, I'm trying to put
2017 Jun 06
2
Plot MArginal distribution in the correct place
Hi all,
I have this code, but the marginal distribution plot doesn?t appear aligned
with the left plot.
I think could be something about layout or par() mar.
The code was programmed by me time ago.
Can anyone help me to get the marginal distribution on the center (more
higher centered)
id.txt
Could have this code:
05/01/2016;9335,200195
06/01/2016;9197,400391
07/01/2016;9059,299805
2017 Jun 14
0
Plot MArginal distribution in the correct place
Hi Pedro,
If you keep that same margins for the second plot:
par(mar=c(10,0,6,6))
barplot(fhist$counts,axes=FALSE, space=0,horiz=TRUE,col="lightgray")
it looks reasonably well aligned to me. Because you are plotting the
counts of the values in Simulation, the ordinate (vertical axis) of
the bar plot is in quite different units from that of the plot on the
left side.
Jim
On Wed, Jun
2013 Jan 21
2
Why using hist when setting the parameter probability=TRUE does not create probability plot?
Hi All,
When carrying out hist(samples,breaks=50,probability=TRUE), the column
values are considerably greater than 1, which seams very unreasonable. The
plot is attached.
I think the column value of the hist plot should correspond to
x$counts/sum(x$counts)
   (x=hist(samples,breaks=50,probability=TRUE)). The size of data is a
little bit larger,  causing failure of uploading. If you need the
2017 Jun 07
0
Plot MArginal distribution in the correct place
Please, I'm trying to put the right plot higher and centered on the left
values but I don't achive.
I would appreciate so much your help
El 6 jun. 2017 22:37, "Pedro p?ramo" <percentil101 at gmail.com> escribi?:
> Hi all,
>
> I have this code, but the marginal distribution plot doesn?t appear
> aligned with the left plot.
>
>
> I think could be
2017 Jun 17
1
Plot MArginal distribution in the correct place
Can you suggest a plot on the right side so that the right plot has the
same units of left plot and reflect the counts of the number of time the
values repeat, something like the empirical distribution?
2017-06-14 12:30 GMT+02:00 Jim Lemon <drjimlemon at gmail.com>:
> Hi Pedro,
> If you keep that same margins for the second plot:
>
> par(mar=c(10,0,6,6))
>
2009 Dec 08
1
histbackback function
Hi,
I'm trying to recreate a sensitivity-specificity graph using the
histbackback function.  The only problem is that these graphs are typically
drawn with vertical rather than horizontal bar plots (and the histbackback
function only seems to work with horiz=TRUE argument, using "horiz=FALSE"
doesn't work).  Does anyone know if:
1) there's a different graphing function that
2005 May 30
3
values of bars in barplot
Hi, 
I couldn't find how to have the values written on the
top of each bar in a barplot. When using hist(), it is
possible to use labels=T, but this option does not
seem to exist for barplot().
Is there a trick I could use to do that ?
Thanks to all
Luc
2004 Aug 19
3
mtext adj= wrong with several las= (PR#7188)
Dear all, 
Our quite basic function mtext() does wrong adjustments in some parameter
configurations. This gets obvious when using multi line texts: There is no
way to properly adjust text perpendicular to axis 2, for example.
Best
Jens Oehlschl?gel
m <- matrix(1:9, 3)
colnames(m) <- c("several\nlines", "several\nlines", "several\nlines")
par(mfrow=c(2,2))
2013 Jan 22
1
How to remove the vertical space between two graps
Hi,
I have created a barplot using the following code.
a<-c(11,23,15,34,42,31)
m<-matrix(a,nrow=2)
m[2,]<-(-1)*m[2,]
par(mar=c(4,4,4,0))
barplot(m[2,],horiz=T)
par(mar=c(4,0,4,2))
barplot(m[1,],horiz=T,col="black")
and the plot obtained is shown in "plot1.tiff".
I was not willing to see the gap (vertical space) between two graphs.
How can I achieve it?
Further
2010 Dec 21
4
labels and barchart
Hello,
I'm wondering how to set a value of mar ( par( mar=c(.......)) ) in
order to allow labels to be visible in barplot. Is there any relation
between the number of characters in a label and the second value of
mar? Look at my example.
x <- seq(20, 100, by=15)
ety <- rep( "Effect on treatment group", times=length(x))
barplot(x, names.arg=ety, las=1, horiz=TRUE)
Labels are
2004 Apr 15
1
tapply() and barplot() help files for 1.8.1
Hi,
I've just upgraded to 1.9.0 and one of my Sweave files that produces a
number of barplots in a standard manner now produces them in a
different way.  I have made a couple of small changes to my code to
get the back the output I was getting before upgrading and now (mostly
out of curiosity) would like to understand what has changed.
I *think* I've tracked it down to tapply() and/or
1998 Jan 23
1
R-beta: image has white horiz lines
I have attached an image file created by R.  The image has white
horizontal lines between the cells.  The image looks OK in the R Graphics
window, but has the horiz lines when viewed in Ghostview (after using
save.plot) or when printed out using print.plot.
There appears to be a problem with the image code (maybe this will go away
in the new version). I am running under Linux and am using 61.1.