Re: [R] Improve my plot

2021-09-22 Thread varin sacha via R-help
Hi, Many thanks to all of you for your precious help. Best, Le mardi 21 septembre 2021, 00:12:02 UTC+2, Jim Lemon a écrit : Hi varin, Not too difficult: par(mar=c(5,13,4,1)) barplot(height=c(574,557,544,535,534,532,531,527,526,525,524,520,518, 512,507,504,504,489,488,488,487,484,484,4

Re: [R] Improve my plot

2021-09-20 Thread Jim Lemon
Hi varin, Not too difficult: par(mar=c(5,13,4,1)) barplot(height=c(574,557,544,535,534,532,531,527,526,525,524,520,518, 512,507,504,504,489,488,488,487,484,484,474,472,455,444,420), names.arg=c("Fribourg(f)","Valais(d)", "Appenzell Rhodes Intérieures","Fribourg(d)","Jura","Schwyz", "Schaffhouse"

Re: [R] Improve my plot

2021-09-20 Thread Bert Gunter
Don't do this! Use a dotchart instead. See the Wikipedia article on dotplots or search. height=c(574,557,544,535,534,532,531,527,526,525,524,520,518,512,507,504,504,489,488,488,487,484,484,474,472,455,444,420) ## kudos for plotting the sorted results rather than alphabetically. nm <- c("Fribourg

Re: [R] Improve my plot

2021-09-20 Thread varin sacha via R-help
Hi Rui, Many thanks but when I copy and paste your R code here below I get 2 error mesages : ## h <- c(574,557,544,535,534,532,531,527,526,525,         524,520,518,512,507,504,504,489,488,488,         487,484,484,474,472,455,444,420) nms <- c("Fribourg(f)","Valais(d)","Appenzell Rho

Re: [R] Improve my plot

2021-09-20 Thread Rui Barradas
Hello, With package ggplot2 this is easy. ggplot2 is meant to work with data in lists or data.frames, so I use the new pipe operator to pass the data on to ggplot(). h <- c(574,557,544,535,534,532,531,527,526,525, 524,520,518,512,507,504,504,489,488,488, 487,484,484,474,472,455,

[R] Improve my plot

2021-09-20 Thread varin sacha via R-help
Dear R-experts, Here below my R code. I would need your help to improve my graph/plot. - The x-axis to be longer not to stop at 500 value - All the name on the y-axis to appear not only a few of them and the name (Fribourg(f), Appenzell Rhodes Intérieures,...) to appear entire, not to be cut Ma