From: Doug Weathers on
Hi,

I am working on a MATLAB program that needs to produce a nice-looking report.

The PUBLISH command is very nearly perfect, except the quality of the graphics that end up in the report are not very impressive. They look terrible when printed.

I can manually export a figure to a PDF file and it prints out beautifully. I would like some way to get this to work with PUBLISH.

Does anyone have any suggestions or alternatives?

Thanks,

Doug
From: Doug Weathers on
No replies yet, so I'm adding some more information.

When I say the quality of images produced with the PUBLISH command is "terrible", I mean that the resolution is poor. It looks like it's being printed in screen resolution (72dpi) instead of the printer resolution (600dpi).

The only place I can find to set the resolution of an image is when you're printing it.

At first I was exited when I saw that the Figure Capture Method parameter for the publishing configuration included "print" as a method. However, all that does is set the background to white.

I can improve the look of the output images by making them as big as possible on my screen, but I can't make them big enough to make me happy with them. Plus what happens when someone with a bigger/smaller screen runs my code?

I thought I had a workaround - export the image to a bitmap, then use the <<filename>> image include trick for the PUBLISH command. But that doesn't appear to work for publishing to a PDF file.

There's just got to be a good way to solve this problem, but I haven't had any luck finding it.

Could someone give me some tips?

Thanks,

Doug

"Doug Weathers" <dougw(a)spamcop.net> wrote in message <i1l3dg$ab4$1(a)fred.mathworks.com>...
> Hi,
>
> I am working on a MATLAB program that needs to produce a nice-looking report.
>
> The PUBLISH command is very nearly perfect, except the quality of the graphics that end up in the report are not very impressive. They look terrible when printed.
>
> I can manually export a figure to a PDF file and it prints out beautifully. I would like some way to get this to work with PUBLISH.
>
> Does anyone have any suggestions or alternatives?
>
> Thanks,
>
> Doug
From: Loren_Shure on

"Doug Weathers" <dougw(a)spamcop.net> wrote in message
news:i1qgrg$i18$1(a)fred.mathworks.com...
> No replies yet, so I'm adding some more information.
>
> When I say the quality of images produced with the PUBLISH command is
> "terrible", I mean that the resolution is poor. It looks like it's being
> printed in screen resolution (72dpi) instead of the printer resolution
> (600dpi).
>
> The only place I can find to set the resolution of an image is when you're
> printing it.
>
> At first I was exited when I saw that the Figure Capture Method parameter
> for the publishing configuration included "print" as a method. However,
> all that does is set the background to white.
>
> I can improve the look of the output images by making them as big as
> possible on my screen, but I can't make them big enough to make me happy
> with them. Plus what happens when someone with a bigger/smaller screen
> runs my code?
>
> I thought I had a workaround - export the image to a bitmap, then use the
> <<filename>> image include trick for the PUBLISH command. But that
> doesn't appear to work for publishing to a PDF file.
>
> There's just got to be a good way to solve this problem, but I haven't had
> any luck finding it.
>
> Could someone give me some tips?
>
> Thanks,
>
> Doug
>
> "Doug Weathers" <dougw(a)spamcop.net> wrote in message
> <i1l3dg$ab4$1(a)fred.mathworks.com>...
>> Hi,
>>
>> I am working on a MATLAB program that needs to produce a nice-looking
>> report.
>>
>> The PUBLISH command is very nearly perfect, except the quality of the
>> graphics that end up in the report are not very impressive. They look
>> terrible when printed.
>>
>> I can manually export a figure to a PDF file and it prints out
>> beautifully. I would like some way to get this to work with PUBLISH.
>>
>> Does anyone have any suggestions or alternatives?
>>
>> Thanks,
>>
>> Doug

Doug-

There are configuration options for publish. You can access them in the
editor where the publish button is and set some of the details about figures
there. Not sure if it has all you want, but that's a place to start.

--Loren

From: us on
"Loren_Shure" <loren.shure(a)mathworks.com> wrote in message <i21ddo$7bh$1(a)fred.mathworks.com>...
>
> "Doug Weathers" <dougw(a)spamcop.net> wrote in message
> news:i1qgrg$i18$1(a)fred.mathworks.com...
> > No replies yet, so I'm adding some more information.
> >
> > When I say the quality of images produced with the PUBLISH command is
> > "terrible", I mean that the resolution is poor. It looks like it's being
> > printed in screen resolution (72dpi) instead of the printer resolution
> > (600dpi).
> >
> > The only place I can find to set the resolution of an image is when you're
> > printing it.
> >
> > At first I was exited when I saw that the Figure Capture Method parameter
> > for the publishing configuration included "print" as a method. However,
> > all that does is set the background to white.
> >
> > I can improve the look of the output images by making them as big as
> > possible on my screen, but I can't make them big enough to make me happy
> > with them. Plus what happens when someone with a bigger/smaller screen
> > runs my code?
> >
> > I thought I had a workaround - export the image to a bitmap, then use the
> > <<filename>> image include trick for the PUBLISH command. But that
> > doesn't appear to work for publishing to a PDF file.
> >
> > There's just got to be a good way to solve this problem, but I haven't had
> > any luck finding it.
> >
> > Could someone give me some tips?
> >
> > Thanks,
> >
> > Doug
> >
> > "Doug Weathers" <dougw(a)spamcop.net> wrote in message
> > <i1l3dg$ab4$1(a)fred.mathworks.com>...
> >> Hi,
> >>
> >> I am working on a MATLAB program that needs to produce a nice-looking
> >> report.
> >>
> >> The PUBLISH command is very nearly perfect, except the quality of the
> >> graphics that end up in the report are not very impressive. They look
> >> terrible when printed.
> >>
> >> I can manually export a figure to a PDF file and it prints out
> >> beautifully. I would like some way to get this to work with PUBLISH.
> >>
> >> Does anyone have any suggestions or alternatives?
> >>
> >> Thanks,
> >>
> >> Doug
>
> Doug-
>
> There are configuration options for publish. You can access them in the
> editor where the publish button is and set some of the details about figures
> there. Not sure if it has all you want, but that's a place to start.
>
> --Loren

unfortunately, there's no documented option to tweak the resolution...

us
From: Doug Harriman on
"Doug Weathers" <dougw(a)spamcop.net> wrote in message <i1l3dg$ab4$1(a)fred.mathworks.com>...
> Hi,
>
> I am working on a MATLAB program that needs to produce a nice-looking report.
>
> The PUBLISH command is very nearly perfect, except the quality of the graphics that end up in the report are not very impressive. They look terrible when printed.
>
> I can manually export a figure to a PDF file and it prints out beautifully. I would like some way to get this to work with PUBLISH.
>
> Does anyone have any suggestions or alternatives?
>
> Thanks,
>
> Doug

Doug -

I made a little progress by modifying this line in publish.m:

x = hardcopy(tempfigure,'-dzbuffer','-r0');

You can increase the rendered resolution by increasing the '-r' value. I tried '-r600'. While there resolution seemed to go up, the render time went up significantly, and the HTML report seemed to just have larger images, which no longer fit inline with the text. Seems like a step in the right direction, but more work needed to keep more pixels from just increasing image size.

- Doug