octave printing plot doesn't maintain font size or print title

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

octave printing plot doesn't maintain font size or print title

everphilski
I'm using Octave 3.2.4.

When I go to print a plot, it does not print the plot title to file (-djpeg) or print the axes in the font size I selected. Both appear in the plot window, but neither in file. Is there something I need to do prior to printing to "finalize" the image?

thanks,

Philip
Reply | Threaded
Open this post in threaded view
|

Re: octave printing plot doesn't maintain font size or print title

bpabbott
Administrator

On Aug 24, 2011, at 7:41 AM, everphilski wrote:

> I'm using Octave 3.2.4.
>
> When I go to print a plot, it does not print the plot title to file (-djpeg)
> or print the axes in the font size I selected. Both appear in the plot
> window, but neither in file. Is there something I need to do prior to
> printing to "finalize" the image?
>
> thanks,
>
> Philip

I'm a bit confused.

Is the entire title missing, it is the font size wrong?

Please also tell us what OS you are running Octave on and where you obtained your copy.

If you can provide a simple example (script) and attach the resulting jpeg that would be helpful as well.

Ben

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave printing plot doesn't maintain font size or print title

bpabbott
Administrator

On Aug 24, 2011, at 9:31 AM, Ben Abbott wrote:

On Aug 24, 2011, at 7:41 AM, everphilski wrote:

I'm a bit confused.

Is the entire title missing, it is the font size wrong?

Please also tell us what OS you are running Octave on and where you obtained your copy.

If you can provide a simple example (script) and attach the resulting jpeg that would be helpful as well.

Ben

I'm using Octave 3.2.4.

When I go to print a plot, it does not print the plot title to file (-djpeg)
or print the axes in the font size I selected. Both appear in the plot
window, but neither in file. Is there something I need to do prior to
printing to "finalize" the image?

thanks,

Philip


Can you give us a short example script so that we may try to duplicate your result?

Ben



_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave printing plot doesn't maintain font size or print title

bpabbott
Administrator
On Aug 24, 2011, at 9:48 AM, Philip Hahn wrote:

On Wed, Aug 24, 2011 at 8:39 AM, Ben Abbott <[hidden email]> wrote:

On Aug 24, 2011, at 9:31 AM, Ben Abbott wrote:

On Aug 24, 2011, at 7:41 AM, everphilski wrote:

I'm a bit confused.

Is the entire title missing, it is the font size wrong?

Please also tell us what OS you are running Octave on and where you obtained your copy.

If you can provide a simple example (script) and attach the resulting jpeg that would be helpful as well.

Ben

I'm using Octave 3.2.4.

When I go to print a plot, it does not print the plot title to file (-djpeg)
or print the axes in the font size I selected. Both appear in the plot
window, but neither in file. Is there something I need to do prior to
printing to "finalize" the image?

thanks,

Philip


Can you give us a short example script so that we may try to duplicate your result?

Ben

See attached script and 2 images.
the -dpng has an incorrectly shaped box around the legend.
the -djpeg **does** have the title (I had to change the original script due to proprietary data, I originally used a string concantenated with strcat()) but does not respect the font sizing.

philip

Thanks for the detail.

Octave is trusting gnuplot to handle the fontsize correctly. Unfortunately, gnuplot doesn't handle the fontsize consistently across different output formats.

The legend problem is also with gnuplot.

I don't have a copy of 3.2.4 to try (this problem should be fixed in the 3.4.x serious) Please try the syntax below, and let us know if you get a better result.

clf
title('Wyle Data')
x = -pi:0.01:pi;
plot(x, sin(x), 'bs');
axis([0.,pi,-1,1]); 

legend('Wyle Test','CFD','location','southeast');
legend('boxon');
xlabel("x/D");
ylabel("Cp");

print -F18 test.jpg

Ben

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: octave printing plot doesn't maintain font size or print title

bpabbott
Administrator

On Aug 24, 2011, at 10:13 AM, Philip Hahn wrote:

On Wed, Aug 24, 2011 at 9:09 AM, Ben Abbott <[hidden email]> wrote:
On Aug 24, 2011, at 9:48 AM, Philip Hahn wrote:

On Wed, Aug 24, 2011 at 8:39 AM, Ben Abbott <[hidden email]> wrote:

On Aug 24, 2011, at 9:31 AM, Ben Abbott wrote:

On Aug 24, 2011, at 7:41 AM, everphilski wrote:

I'm a bit confused.

Is the entire title missing, it is the font size wrong?

Please also tell us what OS you are running Octave on and where you obtained your copy.

If you can provide a simple example (script) and attach the resulting jpeg that would be helpful as well.

Ben

I'm using Octave 3.2.4.

When I go to print a plot, it does not print the plot title to file (-djpeg)
or print the axes in the font size I selected. Both appear in the plot
window, but neither in file. Is there something I need to do prior to
printing to "finalize" the image?

thanks,

Philip


Can you give us a short example script so that we may try to duplicate your result?

Ben

See attached script and 2 images.
the -dpng has an incorrectly shaped box around the legend.
the -djpeg **does** have the title (I had to change the original script due to proprietary data, I originally used a string concantenated with strcat()) but does not respect the font sizing.

philip

Thanks for the detail.

Octave is trusting gnuplot to handle the fontsize correctly. Unfortunately, gnuplot doesn't handle the fontsize consistently across different output formats.

The legend problem is also with gnuplot.

I don't have a copy of 3.2.4 to try (this problem should be fixed in the 3.4.x serious) Please try the syntax below, and let us know if you get a better result.

clf
title('Wyle Data')
x = -pi:0.01:pi;
plot(x, sin(x), 'bs');
axis([0.,pi,-1,1]); 

legend('Wyle Test','CFD','location','southeast');
legend('boxon');
xlabel("x/D");
ylabel("Cp");

print -F18 test.jpg

Ben
 
Your script results in no title - see attached.
the -dpng works well enough for now. Thanks.

philip
<test.jpg>

My mistake. The title() command needs to go after the plot command.

Ben


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave