[Top][All Lists]

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

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

From: Markus Mützel
Subject: Re: Controlling Axes, etc. for Simple 2D Plots
Date: Mon, 9 Sep 2019 16:27:42 +0200

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


I cannot reproduce your exampls because I don't have the data for the variables 
and "ModeShape".
But here some general questions:
Which graphics toolkit are you using? Have you tried with other graphics 
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?


reply via email to

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