help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling Axes, etc. for Simple 2D Plots


From: Brad Davis
Subject: Re: Controlling Axes, etc. for Simple 2D Plots
Date: Mon, 9 Sep 2019 13:00:45 -0400

Markus and the group,

Thanks for the reply. I attached a modified version of the program that should work on your machines. The x and y values are fake.

My goal is to print the figure to pdf, so the resulting pdf is attached. In the x-axis label, the bottom parts of the q, y, (, and ) are chopped off. What would fix this?

Thanks for any help.

Brad Davis, Ph.D., S.E.
address@hidden


On Mon, Sep 9, 2019 at 10:27 AM "Markus Mützel" <address@hidden> wrote:
On Mon, 9 Sep 2019 06:15:54 -0400 Brad Davis wrote:
> Dear Group,
>
> Some help with this would be greatly appreciated. The following is the
> relevant code for my plots. Attached is the result. The bottom parts of the
> "q" and "y" in the x-axis label are chopped off. What do I need to do to
> stop this from happening?
>
> Also, if anybody has a group of examples for plotting, sharing would be
> greatly appreciated.
>
> TextSize = 10;
> axes('FontSize',TextSize);
> h = figure;
> set(h,'PaperSize',[4 3.5]);
> set(h,'PaperPosition',[0.1,0.4,4,3]);
> set(gca,'fontname','Times');
> hold on;
> box on;
> grid on;
> plot(f(:,1),ModeShape(:,1),'r','linewidth',1);
> plot(f(:,2),ModeShape(:,2),'g--','linewidth',1);
> plot(f(:,3),ModeShape(:,3),'b-.','linewidth',1);
> xlabel('Frequency (Hz)','fontsize',TextSize);
> ylabel('Mode Shape Value','fontsize',TextSize);
>
> Brad Davis, Ph.D., S.E.
> address@hidden
>
> On Sat, Sep 7, 2019 at 2:12 PM Brad Davis <address@hidden> wrote:
>
> > I'm having a lot of trouble understanding how to control the size of
> > plots, axes positions, etc. For example, a current script of mine is
> > resulting in the y-axis label being pushed too far to the right, so it's
> > overlapping the numerical values on the y-axis. Is there a clear example of
> > how to use papersize, paperposition, defaultaxesposition, etc.?
> >
> > Brad Davis, Ph.D., S.E.
> > address@hidden

Brad,

I cannot reproduce your exampls because I don't have the data for the variables "f"
and "ModeShape".
But here some general questions:
Which graphics toolkit are you using? Have you tried with other graphics toolkits?
What happens if you execute one of the following lines before your code?
close('all'); graphics_toolkit('qt');
close('all'); graphics_toolkit('fltk');
close('all'); graphics_toolkit('gnuplot');

Do you see the issues on screen or when plotting to a file?

Markus

Attachment: Example.m
Description: Binary data

Attachment: Example.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]