ElMaestro
★★★

Denmark,
2019-09-30 11:41
(1641 d 05:53 ago)

Posting: # 20652
Views: 4,646
 

 How to display an EMF/WMF ? [🇷 for BE/BA]

Hi all,

I am fiddling around with some plots related to BE evaluation and I am facing the following issue. I use syntax like:
win.metafile("Fooo.wmf", width = 6, height =4.5)
#some code here for the plot routs
dev.off()


, after which I do scripted stuff on Fooo.wmf.
All this is automated at a grandiose level.

After some additional processing steps I may want to pull up some of the files like Fooo.wmf to the screen for quick eyeballing and nothing else.
This seems to be very difficult. R allows me create a plot, save a plot as wmf/emf, but not view a plot saved this way?
I do not know at the time of creation if the plot is a candidate for on-screen viewing, this is a little depending on all the other processes.

Do you experts have a suggestion on how to pull up a wmf/emf, preferably one which does not involve installation of 200 different packages, and preferably one which does not involve me to change graphics format?

I think I may be able to spawn a new process like e.g. a browser and use that filename as an argument, this would likely work in Firefox etc, but it seems very clumsy.

Many thanks.

Pass or fail!
ElMaestro
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-09-30 12:10
(1641 d 05:24 ago)

@ ElMaestro
Posting: # 20653
Views: 3,986
 

 Reading vector images

Hi ElMaestro,

❝ After some additional processing steps I may want to pull up some of the files like Fooo.wmf to the screen for quick eyeballing and nothing else.

❝ This seems to be very difficult. R allows me create a plot, save a plot as wmf/emf, but not view a plot saved this way?


Correct. R reads only bitmaps (PNG, GIF, TIFF, JPEG). Vector formats (PS, PDF, SVG, EMF/WMF, EMF+) no way. Package rsvg renders SVG into bitmaps.
Hence, you have to leave R. I suggest Inkscape or import the file in OO (Writer, Impress) and check it there.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2019-09-30 12:24
(1641 d 05:10 ago)

@ ElMaestro
Posting: # 20654
Views: 3,963
 

 How to display an EMF/WMF ?

Hi ElMaestro,

First I agree with Helmut's comments about R's graphic output formats. Here is a very nice link about how to output R's plots. Hope this can save you and your plots.

All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
mittyri
★★  

Russia,
2019-10-01 01:09
(1640 d 16:25 ago)

@ ElMaestro
Posting: # 20659
Views: 3,911
 

 devEMF

Hi ElMaestro,

just want to add that I used emf format in some app and figured out that devEMF is the best package for EMF so far (it vectorizes what could be vectorized) and EMFplus format is recommended for nice plots with shading and other beauties.
By the way some types of lines were not supported at the moment (i.e.from ggplot) and some viewers have troubles with interpretation of EMFplus

Kind regards,
Mittyri
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-10-01 01:47
(1640 d 15:47 ago)

@ ElMaestro
Posting: # 20660
Views: 3,934
 

 How to display an EMF/WMF ?

Hi ElMaestro,

❝ I think I may be able to spawn a new process like e.g. a browser and use that filename as an argument, this would likely work in Firefox etc, but it seems very clumsy.


Does not work in any of the browsers I’ve tested (Chrome, Firefox, Opera, SeaMonkey, IE). Generally you are asked to either save it (idiotic cause you just opened it) or show it in an external viewer. Forget Ink­scape (too heavy for such a simple task). I recommend IrfanView. Lightweight and tons of formats supported.

[image]

I suggest the 32bit version even on 64bit Windows because some plugins are not available for the 64bit version yet. Onless you want to deal with 25+ Mpx 16bit TIFFs practically no difference in speed.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
ElMaestro
★★★

Denmark,
2019-10-01 03:48
(1640 d 13:46 ago)

@ Helmut
Posting: # 20661
Views: 3,901
 

 How to display an EMF/WMF ?

Hi Hötzi,

❝ ❝ I think I may be able to spawn a new process like e.g. a browser and use that filename as an argument, this would likely work in Firefox etc, but it seems very clumsy.


❝ Does not work in any of the browsers I’ve tested (Chrome, Firefox, Opera, SeaMonkey, IE). Generally you are asked to either save it (idiotic cause you just opened it) or show it in an external viewer. Forget Ink­scape (too heavy for such a simple task). I recommend IrfanView. Lightweight and tons of formats supported.


Thanks for all this.
I believe I did not really explain well my situation. I am generating a lot of plots. After the generation of those plots I need to pull up some of them, but it is untenable if I pull them up manually, say in an external program like Irfan with manual open/inspect/close. Once you have done 10 of them this way and you have 1000, you get very tired and you realise you are going to be very late for dinner :-D:-D

I need in R, not in other software, to run through my directory, pull up a few plots (that I've just made in R) to the screen, hit a key to close the plot, and go to the next plot.

Pass or fail!
ElMaestro
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-10-01 12:25
(1640 d 05:09 ago)

@ ElMaestro
Posting: # 20662
Views: 3,777
 

 How to display an EMF/WMF ?

Hi ElMaestro,

❝ […] I am generating a lot of plots. After the generation of those plots I need to pull up some of them, but it is untenable if I pull them up manually, say in an external program like Irfan with manual open/inspect/close. Once you have done 10 of them this way and you have 1000, you get very tired and you realise you are going to be very late for dinner :-D:-D


❝ I need in R, …


IMHO, no way.

❝ … not in other software, to run through my directory, pull up a few plots (that I've just made in R) to the screen, hit a key to close the plot, and go to the next plot.


If you have all plots in one directory, I still recommend IrfanView. Open the first one and use [image] in the menu bar to open the next. If you prefer the keyboard, use Page Down or .
Even faster scrolling with the mouse-wheel. Just tried it with ~2,500 30 MByte photos in RAW format. Took 15 seconds. Now my index finger finger hurts and I have a headache.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
ElMaestro
★★★

Denmark,
2019-10-03 10:42
(1638 d 06:53 ago)

@ Helmut
Posting: # 20663
Views: 3,686
 

 How to display an EMF/WMF ?

Hi Hötzi,

❝ Now my index finger finger hurts and I have a headache.


Tough sh!t.

Pass or fail!
ElMaestro
UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,638 registered users;
76 visitors (0 registered, 76 guests [including 8 identified bots]).
Forum time: 16:35 CET (Europe/Vienna)

Nothing shows a lack of mathematical education more
than an overly precise calculation.    Carl Friedrich Gauß

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5