Thread Subject: how to add a minor grid in a graph in matlab

Subject: how to add a minor grid in a graph in matlab

From: stellakr08

Date: 3 Sep, 2008 12:04:59

Message: 1 of 3

Hello I want to add minor grid in matlab but with the step i want and i dont know the command. For example my ticks is from 0 to 400 and the step is 50 so the grid start with a step of 50 but i would like to have minor grid with a step of 25...how can i do that...Can someone inform me please?

Subject: how to add a minor grid in a graph in matlab

From: Walter Roberson

Date: 3 Sep, 2008 16:36:00

Message: 2 of 3

stellakr08 wrote:
> Hello I want to add minor grid in matlab but with the step i want and i dont
> know the command. For example my ticks is from 0 to 400 and the step is 50 so
> the grid start with a step of 50 but i would like to have minor grid with a step
> of 25...how can i do that...Can someone inform me please?

You can use

grid minor

to turn on the minor grid, but Matlab does not supply any axes property to
allow you to control the spacing explicitly: it always automatically determines
the spacing it will use for the minor grid lines.

There might perhaps be a Matlab File Exchange (FEX) contribution that would
assist in this?

--
Q = quotation(rand);
if isempty(Q); error('Quotation server filesystem problems')
else sprintf('%s',Q), end

Subject: how to add a minor grid in a graph in matlab

From: heiko_marx@hotmail.com

Date: 4 Sep, 2008 13:03:40

Message: 3 of 3

On 3 Sep., 18:36, Walter Roberson <rober...@hushmail.com> wrote:
> stellakr08 wrote:
> > Hello I want to add minor grid in matlab but with the step i want and i dont
> > know the command. For example my ticks is from 0 to 400 and the step is 50 so
> > the grid start with a step of 50 but i would like to have minor grid with a step
> > of 25...how can i do that...Can someone inform me please?
>
> You can use
>
> grid minor
>
> to turn on the minor grid, but Matlab does not supply any axes property to
> allow you to control the spacing explicitly: it always automatically determines
> the spacing it will use for the minor grid lines.
>
> There might perhaps be a Matlab File Exchange (FEX) contribution that would
> assist in this?
>
> --
> Q = quotation(rand);
> if isempty(Q); error('Quotation server filesystem problems')
> else sprintf('%s',Q), end

Hi.

Another way might be to set the major tick to the minor tick positions
you want, to have a controllable tick, and label only the major
ticks.

Heiko

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com