custom layout size

Hi,
I am creating plots for submission to a journal that requests figures in TIFF (first choice) or EPS, and I need to create a specific size, such as 17.35cm width. Print layouts don't seem to match well, because they are tied to the printer format, and require margins, but using graphs directly would be tedious. So, what I did was to create a layout in a standard format, such as A4, then save graphics to TIFF, then open in Adobe Illustrator and resize the image there.
Is there a more elegant way to do this, perhaps directly in Igor without using AI?
Thanks, Tom
You can create a page setup using a custom paper size. Create the page setup, choose File->Page Setups, and select a custom paper size.

Alternatively, when you export graphics from Igor using the SavePICT operation you can specify the coordinates of the section of the page setup that you want to export. Use the /W flag. To do this manually, click the marquee tool in the page layout, drag out a marquee, and choose File->Save Graphics. The resulting Save Graphics dialog will show the dimensions of your marquee and will generate the /W flag from it.

For details on the marquee tool execute:
DisplayHelpTopic "The Marquee Tool"

Also, remember that TIFF is a bitmapped image format, while EPS is more suited for line graphics. I can imagine that the publisher finds it less of a hassle to deal with line graphics converted to bitmaps and saved as TIFF than with photographs embedded in EPS or EPS with missing fonts, but I think that if your plots are line graphics with not too many (e.g., less than a million) data points, you might want to stick with EPS and either use standard postscript fonts (Times, Helvetica, Courier and Symbol) or embed the fonts.
My reason for recommending that, is that your work, when published, will almost certainly be retrieved more often as a PDF from the internet than as a published journal from a library. It is very common for bitmapped images to be downsampled during the conversion to PDF, resulting in a loss of quality, in order to reduce the file size. In contrast with bitmapped images, line graphics in EPS and PDF can be rescaled without loss of image quality and without affecting the file size.
Thanks for the quick replies!!
Howard, I already tried changing the page layout, but it doesn't allow me to specify the size of the page. I have a total of 20 custom layouts in the list, but can't change the size or remove the margins. I assume that this is related to the printer driver of the Dell printer. I also tried changing the default printer to Microsoft XPS document writer, which shouldn't care about size or margins, and restarting Igor, but then I still get the same behavior, indicating to me that Igor is saving these printing details with the document. Since I'm trying to create a printer-independent format, I just don't want to get into this.
I also looked at the marquee tool, and the /W refers to the selection of the marquee, not to the total size of the image, so I didn't succeed well with that one either.
Sven, your description of EPS is very convincing, but, after resizing in AI and importing into Word (just for discussion, not for submission), the image didn't look as good as the resized TIFF, so I probably need to gain some more experience with this before I'm ready for submission.
Tom
I don't know if this helps (as this is dealing with a graph and not a layout), but I just made a graph with some data in it (default size).
I then chose the menu item: File - SaveGraphics...
From the dialog, I chose a TIFF file format, width of 17.5cm, and saved the file.
Opening it up in Photopaint and looking at the image size tells me that it is indeed 17.5 cm wide.
Maybe you could construct your images from a graph object and not the layout?
Quote:

Sven, your description of EPS is very convincing, but, after resizing in AI and importing into Word (just for discussion, not for submission), the image didn't look as good as the resized TIFF, so I probably need to gain some more experience with this before I'm ready for submission.
Tom


That's Word rendering the EPS with a low quality image just for screen display. It's not reflective of the quality of your EPS file or what you would get if you printed your Word file to a decent printer. Word is generating a lower resolution bitmap of the EPS and showing you that on the screen. It's only for screen display though...if you print your word document to a high resolution printer or to a PDF file you'll see the image looks a lot better.

To be fair, it's possible you did something screwy in AI, but I doubt it. I do know the latest version of Word for Windows (2013) still renders ugly looking EPS on screen (it looks the same whether or not the EPS file has an embedded preview, so I think Word must be ignoring the preview now and using its own rendering algorithm) but prints it just fine (I tested on a 600 dpi laser printer that is NOT a postscript printer AFAIKT).
ThomasSLigon wrote:
Howard, I already tried changing the page layout, but it doesn't allow me to specify the size of the page.


It's a bit more work than I remembered on Windows. In Windows 8 (and probably also Windows 7 and Windows Vista):
1. Open Control panel.
2. Click View Devices and Printers.
3. Click on the icon for your printer.
4. Click Print Server Properties in the band that appears just below the menu bar.
You are now in the Print Server Properties dialog.
5. Click the Forms tab.
6. Click the Create a Form checkbox.
7. Enter a name and dimensions for your custom page size.
8. Click OK.

You can now select your custom paper size in the Page Setup dialog in Igor. After selecting your custom paper size, enter your desired margins before clicking OK because, in my test, the margins I set for the custom paper size did not appear by default in the page setup dialog.

That should suffice but here are more instructions for Windows XP and for Windows 8.

Quote:
I also looked at the marquee tool, and the /W refers to the selection of the marquee, not to the total size of the image, so I didn't succeed well with that one either.


The idea was to use the marquee to determine your desired coordinates for /W for the size you want and then use the SavePICT command with the /W flag and your determined coordinates to export. This allows you to export any section of the layout that you want.

ThomasSLigon wrote:
Hi,
I am creating plots for submission to a journal that requests figures in TIFF (first choice) or EPS, and I need to create a specific size, such as 17.35cm width. Print layouts don't seem to match well, because they are tied to the printer format, and require margins, but using graphs directly would be tedious. So, what I did was to create a layout in a standard format, such as A4, then save graphics to TIFF, then open in Adobe Illustrator and resize the image there.
Is there a more elegant way to do this, perhaps directly in Igor without using AI?
Thanks, Tom


This is something I wish was a little easier. One think I have tried with success is open a layout with a normal page as its size (defualt for me). Then change the margins so that inside the margins are the size you want. Now on the layout you see the full page and it also shows the margins. Make your plots so they go right up aginst the margins. When you save the layout as a tiff it will crop the image so there is no white space around it, so if you went right up to the margins (which we are just using as a guide on the layout) then your image will be the right size (or slightly under if you went almost to the margins, but probably close enough).

I have also used power point and made the page size the size I want the figure. PowerPoint (oe similar software) is nice because I can move images around easily and add text.
Quote:
This is something I wish was a little easier.


I'm not sure what you mean.

I think perhaps you mean this:

By default when you export graphics from a page layout, Igor automatically exports the section of the layout that has some graphics on it plus a small margin. But what you really want is for Igor to export the entire page (inside the margins).


Is that correct? If so then, currently, you need to drag out a marquee that selects the entire page inside the margins and then choose Save Graphics. This will generate the appropriate command with the appropriate /W=(left,right,top,bottom) flag. Once you have done this once you can execute the same command subsequently to export the same section of the layout.

If that is not what you mean, please explain further.


hrodstein wrote:
Quote:
This is something I wish was a little easier.


I'm not sure what you mean.

I think perhaps you mean this:

By default when you export graphics from a page layout, Igor automatically exports the section of the layout that has some graphics on it plus a small margin. But what you really want is for Igor to export the entire page (inside the margins).


Is that correct? If so then, currently, you need to drag out a marquee that selects the entire page inside the margins and then choose Save Graphics. This will generate the appropriate command with the appropriate /W=(left,right,top,bottom) flag. Once you have done this once you can execute the same command subsequently to export the same section of the layout.

If that is not what you mean, please explain further.


What I meant is that By default when you export graphics from a page layout, Igor automatically exports the section of the layout that has some graphics on it plus a small margin. (as you said). But I suggested moving the margins because Igor draws a dashed line on the layout where the margins are. If you move the margins so the size inside the margins is the size of the figure you want you now have a visual marker. Then place the figures so they butt up against all sides of the margins. Now when you save graphics and igor by defualt exports the section of the layout with some graphics on it then you will get a figure roughly the size you want. Changing the margins was just a way to put visual markers on the layout so I could draw the graphs with the size and position I want. This won't give you a perfectly sized figure, but one that is probably close enough.

I think it was suggested above but using a graph window and making supgraphs within it might be a better option as it is easy to size everything the way you want. But if your graphs are already made I don't know if there is an easy way to duplicate a graph into a subgraph; in contrast it is easy to add a graph to a layout.

Edit:
Actually I just ran across this post which told me it is easy to add existing graphs as a subgraph:
http://www.igorexchange.com/node/4739
Once again, thanks everyone for the great feedback.
Howard, if I were able to follow your latest suggestion, I would be able to create a form with a specified size. That would still have the drawback that I would need to specify height and width, and I really only want a specific width, to match the journal's guidelines, but the height will vary from figure to figure. However, I cannot follow the suggestion. I am using Windows 8 and a Dell 1355cnw Color MFP, and I do not have "print server" or "forms". I have "printer properties" and "printing preferences", but there are no forms. I can create custom paper sizes, but the Dell driver requires margins for the printer, and the journal wants images without margins.
I think this discussion underlines the fact that layouts are tied to printing properties, and depend on the driver for the printer installed. The Microsoft XPS driver may be a bit more generic, but does not have the features we are looking for. So, layouts are great for printing, but not quite optimal for creating printer-independent output.
I have a figure that consists of 8 graphs with labels A-H. I can create it very nicely in an Igor layout, but then I need to use AI (or something else) to resize it. If I forget about the layout and use the graphs directly, then I still need to combine 8 graphs and 8 labels, so it would be natural to do that in AI, Word, or PowerPoint (or something else), under the condition that the output needs to be TIFF or EPS.
It looks to me like Igor has a little gap here, something like "image layout" in addition to "print layout". I am doing fine with AI, but I think Igor would look better if it weren't necessary.
Tom
ThomasSLigon wrote:
Once again, thanks everyone for the great feedback.
Howard, if I were able to follow your latest suggestion, I would be able to create a form with a specified size. That would still have the drawback that I would need to specify height and width, and I really only want a specific width, to match the journal's guidelines, but the height will vary from figure to figure.


I think in this case my suggestion on setting the margins to give a guideline of the edge is even better. What I would do is set the left and right margins so you have the width you want, and minimize the top and bottom margins (or set it so the max figure height is shown). Now you have the borders of the figure on the left and right and can start putting plots in starting at the top and working down. Just put graphs right up against the left and right margins. Now when you save graphics you will have a figure that is very close to the desired width and have a height that is whatever is needed for that particular figure.
Quote:

Howard, if I were able to follow your latest suggestion, I would be able to create a form with a specified size. That would still have the drawback that I would need to specify height and width, and I really only want a specific width, to match the journal's guidelines, but the height will vary from figure to figure.


The SavePICT /W flag allows you to specify the width and height that you want each time you execute it.

Quote:
However, I cannot follow the suggestion. I am using Windows 8 and a Dell 1355cnw Color MFP, and I do not have "print server" or "forms". I have "printer properties" and "printing preferences", but there are no forms.


I suspect that you have it. I think it is part of the OS, not part of the printer driver. I have attached screen dumps that illustrate how it is done. They show how I created a Custom5x3 paper size. Although you have to select a printer icon before the "Print Server Properties" link appears, the new paper size appears for all printers on my system. Look at the second screen dump (Printers.png) first.

Quote:
I can create custom paper sizes, but the Dell driver requires margins for the printer, and the journal wants images without margins.


Igor never exports the margins so it does not much matter what they are.

Without using /W, SavePICT exports the area containing graphics plus a margin of 5 points (5/72 inch) on each side.

Quote:
It looks to me like Igor has a little gap here, something like "image layout" in addition to "print layout".


I'm still not getting what the gap is. I can see that life would be easier if you could tell Igor to export the whole page without having to use the /W flag - that is, to not automatically limit the exported graphic to the area containing graphics plus the 5-point margin. Other than that it seems that with a custom paper size and /W you can get exactly what you want without much difficulty.

You could also get it without the custom paper size using /W alone but the custom paper size gives you a visual guide (the dotted line showing the margins).
Printers.png (119.03 KB) Print Server Properties.png (18.65 KB)
hrodstein][quote wrote:

I'm still not getting what the gap is. I can see that life would be easier if you could tell Igor to export the whole page without having to use the /W flag - that is, to not automatically limit the exported graphic to the area containing graphics plus the 5-point margin. Other than that it seems that with a custom paper size and /W you can get exactly what you want without much difficulty.

You could also get it without the custom paper size using /W alone but the custom paper size gives you a visual guide (the dotted line showing the margins)


I think asking people to create a paper size for every figure size they want is unreasonable. You might be making dozens of custom page sizes and since you are doing it in the operating system it's going to clutter up other programs page size selection. Since there are a few workarounds for this I will probably never create a custom page size.

/W flag is a good work around, in addition to what I have mentioned above. Also subplots works well too for this as I can specify the exact size of the parent plot, this also has an advantage that I only have one window instead of a layout window and one one for each figure. I don't think an image layout would be needed, but I might use it if it was there.

Quote:
I think asking people to create a paper size for every figure size they want is unreasonable. You might be making dozens of custom page sizes and since you are doing it in the operating system it's going to clutter up other programs page size selection.


Thanks. I understand that. It will most likely be much easier in Igor Pro 7 but that is still a long way off.