Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Subplots m file

Subject: Subplots m file

From: Dave

Date: 17 Jul, 2009 10:41:01

Message: 1 of 3

Hi,

I have an array of 8 columns and simple line graphs of 1 vs 3, 2 vs 4, 5 vs 7, 6 vs 8, subplotted on the same figure with various titles and stuff. So I put one together using a blank figure and the figure palette and created an m file of it. when I came to use the m file to recreate the plot it didnt work.

can anyone help me make it work?

thanks

Dave

Subject: Subplots m file

From: Shanmugam Kannappan

Date: 17 Jul, 2009 11:18:01

Message: 2 of 3

"Dave " <yogi_cave@yahoo.com> wrote in message <h3pkft$jnp$1@fred.mathworks.com>...
> Hi,
>
> I have an array of 8 columns and simple line graphs of 1 vs 3, 2 vs 4, 5 vs 7, 6 vs 8, subplotted on the same figure with various titles and stuff. So I put one together using a blank figure and the figure palette and created an m file of it. when I came to use the m file to recreate the plot it didnt work.
>
> can anyone help me make it work?
>
> thanks
>
> Dave
Hi,

Using generate m file will create m file for only with the properties what you set not for the data which you ploted.
try to recreate the datas in the workspace & pass it to the function which is created from your figure...

Shan...

Subject: Subplots m file

From: Dave

Date: 17 Jul, 2009 15:43:02

Message: 3 of 3

"Shanmugam Kannappan" <shanmugambe@gmail.com> wrote in message <h3pml9$8sq$1@fred.mathworks.com>...
> "Dave " <yogi_cave@yahoo.com> wrote in message <h3pkft$jnp$1@fred.mathworks.com>...
> > Hi,
> >
> > I have an array of 8 columns and simple line graphs of 1 vs 3, 2 vs 4, 5 vs 7, 6 vs 8, subplotted on the same figure with various titles and stuff. So I put one together using a blank figure and the figure palette and created an m file of it. when I came to use the m file to recreate the plot it didnt work.
> >
> > can anyone help me make it work?
> >
> > thanks
> >
> > Dave
> Hi,
>
> Using generate m file will create m file for only with the properties what you set not for the data which you ploted.
> try to recreate the datas in the workspace & pass it to the function which is created from your figure...
>
> Shan...

Thanks for your help, but unfortunately I dont totally understand. I think you want me to make the subplots first and then run the m file i created to add the titles and stuff. unfortunately i cant figure out the subplot function. I am not able to subplot 4 graphs each with 2 data sets on them. for example i want A(:,1) and A(:,2) on one graph and A(:,3) and A(:,4) on another graph, and 2 columns of data on each of the last two axis. each of those has two line on them. thats why i went the long way first time to use the figure palette and write the m file, but it didnt work.

could you please explain the subplot function so i can do the above?

MANY thanks
Dave

Tags for this Thread

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.

Contact us