Re: [R] ggplot2 bar chart: order display for each group

2021-09-20 Thread Jeff Newmiller
I could, but this question is off topic on this mailing list. Read the Posting 
Guide before you post again. Help for ggplot2 can be found in many places... 
start your search here 
https://cran.r-project.org/web/packages/ggplot2/index.html.

(Hint: your data should be a factor.)

On September 20, 2021 2:21:51 PM PDT, Kai Yang via R-help 
 wrote:
>Hello List,
>
>I submitted the code below, it will show two groups of avg_time bar chart for 
>each gc_label.
>
>ggplot(s8_GCtime, aes(fill=GTresult, y=avg_time, x=gc_label, label = 
>avg_time)) + 
>  geom_bar(position=position_dodge(), stat="identity") +
>  geom_text(aes(label=avg_time), vjust=1.6, position = position_dodge(0.9), 
>size=3.5)+
>  theme(axis.text.x = element_text(angle = 45))
>
>
>I found the ggplot put all of small value of avg_time on left side, bigger 
>value of avg_time on right side for each gc_label. But I hope to control the 
>order by GTresult. Could you tell me how to do this?
>
>Thanks,
>Kai
>
>   [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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","Berne(f)","Thurgovie","Valais(f)","Argovie",
 "Appenzell Rhodes Extérieures","Genève","Zoug","Tessin",
 "Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald",
 "Saint-Gall","Soleure","Lucerne","Glaris","Bâle-Campagne","Bâle-Ville"),
 horiz=TRUE,col="deepskyblue2",las=2,xlim=c(0,650),font.axis=4)

With regard to Bert's objection to barplots, you can do the same thing there.

Jim

On Tue, Sep 21, 2021 at 5:24 AM varin sacha via R-help
 wrote:
>
> 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
>
> Many thanks.
>
> ##
> 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","Berne(f)","Thurgovie","Valais(f)","Argovie","Appenzell
>  Rhodes 
> Extérieures","Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne","Glaris","Bâle-Campagne","Bâle-Ville"),font.axis=4,
>  horiz=T,col="deepskyblue2",las=2)
> ##
>
>
>
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ggplot2 bar chart: order display for each group

2021-09-20 Thread Kai Yang via R-help
Hello List,

I submitted the code below, it will show two groups of avg_time bar chart for 
each gc_label.

ggplot(s8_GCtime, aes(fill=GTresult, y=avg_time, x=gc_label, label = avg_time)) 
+ 
  geom_bar(position=position_dodge(), stat="identity") +
  geom_text(aes(label=avg_time), vjust=1.6, position = position_dodge(0.9), 
size=3.5)+
  theme(axis.text.x = element_text(angle = 45))


I found the ggplot put all of small value of avg_time on left side, bigger 
value of avg_time on right side for each gc_label. But I hope to control the 
order by GTresult. Could you tell me how to do this?

Thanks,
Kai

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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(f)","Valais(d)","Appenzell Rhodes
Intérieures","Fribourg(d)","Jura","Schwyz","Schaffhouse","Berne(f)","Thurgovie","Valais(f)","Argovie","Appenzell
Rhodes 
Extérieures","Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne","Glaris","Bâle-Campagne","Bâle-Ville")


 dotchart(height, nm, col = "blue", main = "Dotcharts Rock")

?dotchart gives you the details and options.

Cheers,
Bert



Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Mon, Sep 20, 2021 at 12:24 PM varin sacha via R-help
 wrote:
>
> 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
>
> Many thanks.
>
> ##
> 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","Berne(f)","Thurgovie","Valais(f)","Argovie","Appenzell
>  Rhodes 
> Extérieures","Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne","Glaris","Bâle-Campagne","Bâle-Ville"),font.axis=4,
>  horiz=T,col="deepskyblue2",las=2)
> ##
>
>
>
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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 Rhodes Intérieures",
          "Fribourg(d)","Jura","Schwyz","Schaffhouse","Berne(f)",
          "Thurgovie","Valais(f)","Argovie","Appenzell Rhodes Extérieures",
          "Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald",
          "Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne",
          "Glaris","Bâle-Campagne","Bâle-Ville")
nms <- factor(nms, levels = nms)

library(ggplot2)

data.frame(height = h, names = nms) |>
  ggplot(aes(names, height)) +
  geom_col(fill = "deepskyblue2") +
  coord_flip() +
  theme_classic() +
  theme(axis.text.y = element_text(face = "italic"))
##






Le lundi 20 septembre 2021, 21:54:31 UTC+2, Rui Barradas  
a écrit : 





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,444,420)

nms <- c("Fribourg(f)","Valais(d)","Appenzell Rhodes Intérieures",
          "Fribourg(d)","Jura","Schwyz","Schaffhouse","Berne(f)",
          "Thurgovie","Valais(f)","Argovie","Appenzell Rhodes Extérieures",
          "Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald",
          "Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne",
          "Glaris","Bâle-Campagne","Bâle-Ville")
nms <- factor(nms, levels = nms)

library(ggplot2)

data.frame(height = h, names = nms) |>
  ggplot(aes(names, height)) +
  geom_col(fill = "deepskyblue2") +
  coord_flip() +
  theme_classic() +
  theme(axis.text.y = element_text(face = "italic"))


Hope this helps,

Rui Barradas


Às 20:24 de 20/09/21, varin sacha via R-help escreveu:
> 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
> 
> Many thanks.
> 
> ##
> 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","Berne(f)","Thurgovie","Valais(f)","Argovie","Appenzell
>  Rhodes 
> Extérieures","Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne","Glaris","Bâle-Campagne","Bâle-Ville"),font.axis=4,
>  horiz=T,col="deepskyblue2",las=2)
> ##
>  
> 
>  
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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,444,420)

nms <- c("Fribourg(f)","Valais(d)","Appenzell Rhodes Intérieures",
 "Fribourg(d)","Jura","Schwyz","Schaffhouse","Berne(f)",
 "Thurgovie","Valais(f)","Argovie","Appenzell Rhodes Extérieures",
 "Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald",
 "Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne",
 "Glaris","Bâle-Campagne","Bâle-Ville")
nms <- factor(nms, levels = nms)

library(ggplot2)

data.frame(height = h, names = nms) |>
  ggplot(aes(names, height)) +
  geom_col(fill = "deepskyblue2") +
  coord_flip() +
  theme_classic() +
  theme(axis.text.y = element_text(face = "italic"))


Hope this helps,

Rui Barradas


Às 20:24 de 20/09/21, varin sacha via R-help escreveu:

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

Many thanks.

##
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","Berne(f)","Thurgovie","Valais(f)","Argovie","Appenzell Rhodes 
Extérieures","Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne","Glaris","Bâle-Campagne","Bâle-Ville"),font.axis=4, 
horiz=T,col="deepskyblue2",las=2)
##
  

  


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] ggsave() with width only

2021-09-20 Thread Adam Wysokiński via R-help

Dear Ivan,
I think you don't need to provide the aspect ratio, as this should work 
as well:


save_plot("/tmp/plot.png", p, base_width = 5, base_height = NULL)

--
Regards,
Adam Wysokiński

On 9/20/21 16:09, Ivan Calandra wrote:

Dear Adam,

The function cowplot::save_plot() actually doesn't help in my case 
because I need to know the aspect ratio (which I don't in advance). If I 
knew the aspect ratio, I could calculate the height from the width or 
vice-versa, and then I could use ggplot2::ggsave().


I have found a workaround using the package patchwork: I put the plots 
together into one plot, that I save on an A4 page.


Best,
Ivan

--
Dr. Ivan Calandra
Imaging lab
RGZM - MONREPOS Archaeological Research Centre
Schloss Monrepos
56567 Neuwied, Germany
+49 (0) 2631 9772-243
https://www.researchgate.net/profile/Ivan_Calandra

On 14/09/2021 9:17, Ivan Calandra wrote:

Thank you Adam!

I'm a bit surprised that an extra package is needed for this, but why 
not!


Best,
Ivan

--
Dr. Ivan Calandra
Imaging lab
RGZM - MONREPOS Archaeological Research Centre
Schloss Monrepos
56567 Neuwied, Germany
+49 (0) 2631 9772-243
https://www.researchgate.net/profile/Ivan_Calandra

On 13/09/2021 15:40, Adam Wysokiński wrote:

Hi,
Instead of ggsave(), use save_plot() from the "cowplot" package:

library(ggplot2)
library(cowplot)
x <- 1:10
y <- x^2
df <- data.frame(x, y)
p <- ggplot(df, aes(x, y)) + geom_point()
save_plot("/tmp/plot.png", p, base_aspect_ratio = 1, base_width = 5, 
base_height = NULL)




__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html

and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[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

Many thanks.

##
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","Berne(f)","Thurgovie","Valais(f)","Argovie","Appenzell
 Rhodes 
Extérieures","Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne","Glaris","Bâle-Campagne","Bâle-Ville"),font.axis=4,
 horiz=T,col="deepskyblue2",las=2)
##
 

 

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [ESS] Advice on setting up ESS to edit and knit Rmarkdown files

2021-09-20 Thread Dirk Eddelbuettel via ESS-help


On 20 September 2021 at 13:59, Sparapani, Rodney via ESS-help wrote:
| Over the last few years, we have moved away from having to set up features
| with .emacs/etc.  as much as possible.  Generally, this stuff should just
| work out-of-the-box.

I completely concur and _love it_.

I mostly just have an old .emacs because well over the years I put some
toggles or preferences there.  But stuff does work.

(Every now and then defaults change in ways some of us don't like. I for one
prefer older indentations over the newer clang-format / R's lintr or styler
default which I find unreadable. Luckly I have a snippet I added in 1997 or
so straight from the manual and all is good for me. [ I did have to holler
once or twice whem the lintr was autoenabled with bad defaults to boot. ])

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [R] ggsave() with width only

2021-09-20 Thread Ivan Calandra

Dear Adam,

The function cowplot::save_plot() actually doesn't help in my case 
because I need to know the aspect ratio (which I don't in advance). If I 
knew the aspect ratio, I could calculate the height from the width or 
vice-versa, and then I could use ggplot2::ggsave().


I have found a workaround using the package patchwork: I put the plots 
together into one plot, that I save on an A4 page.


Best,
Ivan

--
Dr. Ivan Calandra
Imaging lab
RGZM - MONREPOS Archaeological Research Centre
Schloss Monrepos
56567 Neuwied, Germany
+49 (0) 2631 9772-243
https://www.researchgate.net/profile/Ivan_Calandra

On 14/09/2021 9:17, Ivan Calandra wrote:

Thank you Adam!

I'm a bit surprised that an extra package is needed for this, but why 
not!


Best,
Ivan

--
Dr. Ivan Calandra
Imaging lab
RGZM - MONREPOS Archaeological Research Centre
Schloss Monrepos
56567 Neuwied, Germany
+49 (0) 2631 9772-243
https://www.researchgate.net/profile/Ivan_Calandra

On 13/09/2021 15:40, Adam Wysokiński wrote:

Hi,
Instead of ggsave(), use save_plot() from the "cowplot" package:

library(ggplot2)
library(cowplot)
x <- 1:10
y <- x^2
df <- data.frame(x, y)
p <- ggplot(df, aes(x, y)) + geom_point()
save_plot("/tmp/plot.png", p, base_aspect_ratio = 1, base_width = 5, 
base_height = NULL)




__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [ESS] Advice on setting up ESS to edit and knit Rmarkdown files

2021-09-20 Thread Sparapani, Rodney via ESS-help
Hi Gang:

I’m not directly answering the question because I don’t use Rmd
(but I do use Rnw all of the time).  And, just to react to a few of
Dirk’s and Tyler’s comments.  Over the last few years, we have
moved away from having to set up features with .emacs/etc.
as much as possible.  Generally, this stuff should just work
out-of-the-box.  For example, there was a time where I was
struggling with Rnw and couldn’t figure out what was wrong by
changing settings/debugging/etc.  But, after an upgrade,
everything just worked.  If you think you have really identified
a bug, then please make a reproducible example and posted
on git as an issue.  In my view, this last post is related to our
new release model.

This model has not been communicated to my recollection
but is de facto.  We had planned
to release 1:2 times per year.  However, that largely
stopped about 2018.  Now, it is pretty much just
grabbing from git where most of these issues have
been worked out, i.e., the repo is supposed to be
in a continual working state (although there may be
occasional mishaps just like anything else).  Part of the
reason for moving to git (unintentionally) is that our
copyrights have mostly been attributed to the FSF.
However, there are a few pieces that are inconveniently
absent.  Similarly, there are a few key pieces that oldsters
like me still want that are found in obsolete.  Not directly
related, but a similar concern is that there is still the issue
of polymode being needed but not part of ESS which you
have to get from git (don’t get me stared julia-mode!).

So, lots of excuses, pick your favorite.  But the upshot
is that git is as convenient as it gets.  And we are not a
company like RStudio so this FOSS setup works for
us as developers and hopefully it still serves the
users well.  I hope that helps from a philosophical
point of view.  My students are unconvinced
and use RStudio but I am not allowed to fail them
for their merely youthful indiscretions ;o)

--
Rodney Sparapani, Associate Professor of Biostatistics
Chair ISBA Section on Biostatistics and Pharmaceutical Statistics
Institute for Health and Equity, Division of Biostatistics
Medical College of Wisconsin, Milwaukee Campus


[[alternative HTML version deleted]]

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [R-es] Exportar a wmf desde linux

2021-09-20 Thread miguel.angel.rodriguez.muinos
Hola José.

WMF es un formato propietario de Microsoft (bajo patente).
Eso es un impedimento serio para que puedan implementarlo en la versión Linux 
de R.
Se podría, haciendo ingeniería inversa y esgrimiendo la "promesa" que hizo 
Microsoft de no denunciar a los que hagan uso de ese formato al margen de la 
patente... pero la manera de que se pueda implementar de una manera natural es 
que utilicen una licencia que no sea restrictiva.

WMF no deja de ser un formato vectorial (algo "extraño" porque puede encapsular 
BMPs) por lo que yo les daría la alternativa de exportar a SVG, EPS o PDF. No 
encuentro ninguna razón por la que WMF sea imprescindible para un ejercicio de 
esas características.

Pd.- Yo aprovecharía la oportunidad que te brinda esta "incidencia" para 
comentar la necesidad de utilizar formatos no-propietarios.


Un saludo,
Miguel.




De: R-help-es  en nombre de José Trujillo 
Carmona 
Enviado: domingo, 19 de septiembre de 2021 13:15
Para: r-help-es
Asunto: [R-es] Exportar a wmf desde linux

Hola compañeros.

Me veo en la necesidad de reemplazar temporalmente a un compañero.
Enseña R con windows, mientras que todos mis equipos están en linux. Me
sería complejo pasar a windows para una asignatura y por solo un par de
meses y no creo que sea necesario.

El caso es que en los protocolos de prácticas mi compañero guarda los
gráficos en wmf utilizando el botón derecho sobre la ventana gráfica.
Este recurso no está disponible en linux.

Puedo guardar en pdf, svg o xfig mediante la función dev.print sin
problema y después cambiarlos mediante LibreOffice o Inkscape, pero se
hace todo un poco pesado (será mi opción "B"). Pero ¿hay opción "A"?

¿Sabéis si hay algún comando linux que exporte a wmf como savePlot en
Windows?

La versión de linux solo exporta a bitmaps en forma "png", "jpeg",
"tiff", "bmp"

Googleando he encontrado que la función ggsave de ggplot2 es posible que
lo haga, ... pero: "(windows only)"

Gracias de antemano.

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es



Nota: A información contida nesta mensaxe e os seus posibles documentos 
adxuntos é privada e confidencial e está dirixida únicamente ó seu 
destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe, por 
favor elimínea. A distribución ou copia desta mensaxe non está autorizada.

Nota: La información contenida en este mensaje y sus posibles documentos 
adjuntos es privada y confidencial y está dirigida únicamente a su 
destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, 
por favor elimínelo. La distribución o copia de este mensaje no está autorizada.

See more languages: http://www.sergas.es/aviso-confidencialidad

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es