forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multiple Plots per Page Output - Best Strategy Ideas ???
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Sun Oct 13, 2013 11:15 am    Post subject: Multiple Plots per Page Output - Best Strategy Ideas ??? Reply with quote

If I want to create say an output file with lots of plots (let's say 50 or more) and put n (say x-y) plots per page, what would be the optimum 'strategy' (from speed and 'compactness' (of both code and resulting file size) viewpoints) to do so.
The idea is to prepare output which can then be copied and pasted into a WORD document.
I'd also like to include an option to output with headers and footers on the pages.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Mon Oct 14, 2013 1:31 am    Post subject: Reply with quote

Buying cheap 4k 40" or 50" Seiki TV as a PC monitor and doing all with pleasure on one screen.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Mon Oct 14, 2013 4:23 am    Post subject: Reply with quote

I don't think you understood Dan, I'm looking to create an output file, not plot onto screen all the plots. Appart from which even a 100 inch screen wouldn't all fit the plots Smile
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Mon Oct 14, 2013 4:46 am    Post subject: Reply with quote

My approach has been to create .png file dumps from Clearwin+, which can be imported into Word .doc files.
I generate a single chart per .png file, although your approach would benefit from a more automated layout.

You would have to be careful about the resolution of your charts.
You could overcome the resolution and the aspect ratio of your screen by using a virtual screen, via Create_Graphics_Region@ and Select_Graphcs_Object@ and then draw to the virtual screen. Export_Image@ could be used to create the .png file.
I prefer a white background for the graphics region, when importing into Word.

Drawing multiple graphs to a single virtual screen easy is by adjusting the offset ix,iy.

You would need to consider if it is easier to manage multiple images in word or a single image per page. I would struggle managing an image import over multiple word pages.
What you are considering might be possible, but it is a balance between automation and practicality of handling the graphics files in Word.
Perhaps a single large exported image from clearwin+ and then clip out what you want in an image editor?
You might struggle with max dimensions of an image in clearwin+

John
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Mon Oct 14, 2013 7:16 pm    Post subject: Reply with quote

I still don't get what you have to accomplish. Batch processing of numerous graphics files without human intervention? Or placing many plots in one screen and save in graphics format? Or something else? What for any file besides graphics files can be used by WORD? Anyway as we do in this group, some more info or an example would always be appreciated

If numerous graphs must be on one screen you can save the screen content into few most useful lossless graphics formats using CWP and import it into WORD or even just PrScr - CTRL+V the screen without bothering with any intermediate files or edit image a bit in some software before incorporating into Word again without bothering with any graphics files and their numerous formats

I have at any given moment 100 graphs of stock market open and can save all of them in a snap using everywhere. If 100 graphs are not needed simultaneously in the same graphics area (say, for huge poster printed by wide printers) then there is no strategy for that needed, you place all of them one by one between your text.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Mon Oct 14, 2013 11:45 pm    Post subject: Reply with quote

Dan,

How do you manage so much information on a %gr screen? Do you use scrolling or tabs or something else ?
I am finding my recent 1920 x 1200 or 1920 x 1080 screens providing good resolution and would not want to give that up with 100 graphs spread across the screen.

John
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Tue Oct 15, 2013 2:10 am    Post subject: Reply with quote

John,

Haven't you seen in all movies that financial businesses use multi-monitors for at least 2-3 last decades?

Or the entire board posters on the conferences printed in one single piece?
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Tue Oct 15, 2013 3:58 am    Post subject: Reply with quote

Dan,

I have seen the latest Fox News super ipads reported on The Daily Show and The Colbert Report, but I did not know if this was a Fox News report that could be believed. The US looks a strange place from the outside these days.

John
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Tue Oct 15, 2013 6:16 am    Post subject: Reply with quote

As to the tablets, the larger size ones with >10" screen soon will be 4K or higher simply because even 4.7" screen phones are 2K. Perfect text fonts without visible pixelation need >400 PPI up to 600 contrary to the retina display numbers around 300. I afraid to tell here the number of K for the journal A4 format size 600PPI 13.6" tablet!

UPDATE. OK that's extreme quality tablet would have 8K, or 30+ megapixels, what full frame DSLR cameras now provide. You'd see 100 of plots on it as perfectly as on multi-monitor screens of four 50" 4K TVs
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Oct 31, 2013 3:18 pm    Post subject: Reply with quote

Thank you gentlemen for all your suggestions so far. To clarify, for example, I may wish to output on one page: a series of images at the top, a graph then below it a block of text, then finally a table of results. A kind of pro-forma if you like containing output of various kinds. This sequence to be repeated n times on n pages (n say could be 100) ... either in 'batch mode', writing to a file ìn such a way that with a simple copy n paste of the whole contents it can be transferred to Word say, OR into a scrollable window to view on the screen (with either all the results, or a kind of flip page type option with a toolbar or such to click between pages. So I guess the question is : how to 'append' each set of results to the end of existing results (each on a new page) ? then how best to do the results on-screen, and maybe flip between them with some kind of button menu/toolbar ( a bit like the image gallerys we often see on webpages. The key points are automation , simplicity and size minimisation too since with hundreds of results the file sizes could get significant. I suppose from the latter point of view it's a bit like good webpage design/implementaiton, minimize individual components on the page and the total will look after itself. Of course there is tha added 'complication' of switching between screen output and file output (pixels to dpi) whilst keeping everything scaled to reality (1:1 in mm) in both environmeents, but that comes later once I have the strategy clear in my head first.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Sun Nov 10, 2013 5:40 pm    Post subject: Reply with quote

So, has anyone any further suggestions based on my previous clarification above .... the key is to produce large size output files data, not on screen data, so the suggestions about buying bigger screens are not really applicable to my situation. Thanks
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Mon Nov 11, 2013 12:01 am    Post subject: Reply with quote

John,

You can output what ever you like. You just have to draw what you want and then export it. I use .png file output.

CREATE_GRAPHICS_REGION@ creates the drawing surface the size you want.
SELECT_GRAPHICS_OBJECT@ select this drawing surface.
then do all the drawing you need as a virtual %gr surface and finally,
export_image@ to export the graphics image for use elsewhere.

I'm sure you could get something you want.
I resort to simple charts, which I import into Word.

John
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Mon Nov 11, 2013 2:30 am    Post subject: Reply with quote

Thanks John for the reply. I am aware of basic procedure you give. My problem (maybe) is that I want to write a large amount of 'pages' of graphs/test in a standard page layout , lets say for example up to 500 (!) to a single file and then be able to copy/paste or import that to a WORD file in one go. I don't know how feasible this will be just for the file size, let alone the layout of a single file . I'm trying to avoid having to cut/paste or import lots of individual files one by one into word, which is obviously a prohibitive amount of time. One basic problem I see with creating a single image for importing to WORD is obviously that different people might have different WORD file 'models' with different margins set, so getting the drawing surface 'length' right might be a challenge. I don't even know if I could write a word format file (binary) from the fortran code, inserting the various drawing surface images as required, since I can't find anything about how to go about doing that, not even a description of the format.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Mon Nov 11, 2013 7:39 am    Post subject: Reply with quote

John,

I can't help with what you are doing, as I don't have experience of multi-page documents.
There are multi-page .gif and .tif formats, but I have never used them. I do not know what would be required to support these in clearwin+. ( Dan might have some experience of these?) Is it a gif movie file ?
One of the advantages of export_image@ is that you can create 1,000's of screen dumps in a program with a systematic file name. You just put the graphics in a DO loop. So you can readily create the .png files automatically.
If you can find a script that can import them into a multi page graphics file format, then you might have a solution.

John
Back to top
View user's profile Send private message
jalih



Joined: 30 Jul 2012
Posts: 196

PostPosted: Mon Nov 11, 2013 5:22 pm    Post subject: Re: Reply with quote

JohnCampbell wrote:
If you can find a script that can import them into a multi page graphics file format, then you might have a solution.

I have created a simple .NET DLL for writing animated GIF-files. It is callable from FTN95 and can write animated GIF-file from specified set of images or alternatively, it can scan directory for images and write animation frames in alphabetical order. You can download it from here. Sources and FTN95 example is included inside the package.

Following example demonstrates the library usage:
Code:

module UseAnimGif
  implicit none

  ! Methods for Object "AnimGif.AnimatedGif"
  ASSEMBLY_EXTERNAL(name="AnimGif.AnimatedGif.ScanImages") ScanImages
  ASSEMBLY_EXTERNAL(name="AnimGif.AnimatedGif.Output") OutAnimGIF
 
end module UseAnimGif


winapp
  use UseAnimGif
  implicit none

  object("AnimGif.AnimatedGif") :: agif
  object("System.String[]") source

  source = new@("System.String[]",5)
  source(0) = "in\e.jpg"
  source(1) = "in\d.jpg"
  source(2) = "in\c.jpg"
  source(3) = "in\b.jpg"
  source(4) = "in\a.jpg"

  !AnimGif.AnimatedGif object can be used like a user defined type
  agif = new@("AnimGif.AnimatedGif")  ! Allocate new AnimatedGif object
  agif%delay = 100  ! Set animation delay in 1/100 s
  agif%files = source  ! Set source image files
  call OutAnimGIF(agif, 'out\testi1.gif')   ! Output animated GIF

  ! Scan directory for image files, sort them alphabetically and output animated gif
  call ScanImages(agif, 'in', '*.jpg')
  call OutAnimGIF(agif, 'out\testi2.gif')

end


Problem is, that MS Word probablty don't support GIF-files with multiple pages (frames). I am guessing, that it only displays the first frame.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group