From: Nicholas Kinar on
Hello--

When creating a plot using a function that opens a Matlab figure window,
the user is given the opportunity to pan the plot using the "hand tool"
which is triggered by clicking on a GUI button.

Is there a way to set the pan on the graph using Matlab code rather than
using the GUI? How might I do this for a 2D plot created using the
plot() function?

Nicholas
From: Walter Roberson on
Nicholas Kinar wrote:

> When creating a plot using a function that opens a Matlab figure window,
> the user is given the opportunity to pan the plot using the "hand tool"
> which is triggered by clicking on a GUI button.
>
> Is there a way to set the pan on the graph using Matlab code rather than
> using the GUI? How might I do this for a 2D plot created using the
> plot() function?

Is your question how to turn on pan mode by code instead of having to
press a button? If so, see the pan() command.

Is your question how to set a specific pan value in code? If so then see
xlim() and ylim() (which in turn set the axes XLim and YLim properties.)
From: Nicholas Kinar on
On 10-06-02 6:03 PM, Walter Roberson wrote:
> Nicholas Kinar wrote:
>
>> When creating a plot using a function that opens a Matlab figure
>> window, the user is given the opportunity to pan the plot using the
>> "hand tool" which is triggered by clicking on a GUI button.
>>
>> Is there a way to set the pan on the graph using Matlab code rather
>> than using the GUI? How might I do this for a 2D plot created using
>> the plot() function?
>
> Is your question how to turn on pan mode by code instead of having to
> press a button? If so, see the pan() command.
>
> Is your question how to set a specific pan value in code? If so then see
> xlim() and ylim() (which in turn set the axes XLim and YLim properties.)

Hello Walter---

Thank you very much for your response! My question is how to set a
specific pan value in the code. The problem that I'm having is that
when I'm plotting with large font size tick labels, the number at the
origin tick of the x-axis can often overlap with the number at the
origin tick of the y-axis.

By using the hand tool, I am able to pan the plot and automatically
remove some of the axis labels.

I also tried setting the XLim and the YLim properties, and this worked
well. I could indeed shift the graph exactly as I required.

So thank you for your help!