Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can i enable 'grid on' function enable for XY graph?

846 views
Skip to first unread message

dfgdg dfgdfg

unread,
Jul 26, 2010, 3:59:07 AM7/26/10
to
How can i enable 'grid on' function enable for XY graph in Simulink?

dfgdg dfgdfg

unread,
Jul 26, 2010, 4:27:05 AM7/26/10
to
Edit:
How can i enable 'grid on' function for XY graph tool in Simulink?

dfgdg dfgdfg

unread,
Jul 27, 2010, 9:16:19 AM7/27/10
to
Is there anyone to answer my question???I want to see grids at XY Graph(simulink block).Is it possible??

Phil Goddard

unread,
Jul 28, 2010, 12:31:04 AM7/28/10
to
There is no block property that allows it to done.

However, an X-Y graph is simply a MATLAB figure window, so assuming the block is open then the following will work

>> hf = findall(0,'Name',get_param(gcb,'Name')); %handle to figure window
>> ha = findall(hf,'Type','axes'); %handle to axis
>> set(ha,'XGrid','on','YGrid','on') % trun the grid on

Phil.

Younghwan Yoon

unread,
Aug 26, 2010, 1:28:05 AM8/26/10
to
'Assuming the block is open' means the XY Graph block is selected
in the Simulink model, right? I checked that this solution works.
Thank you for your solution :)

Atiqah

unread,
Jun 11, 2011, 3:23:05 AM6/11/11
to
"Phil Goddard" <philN...@goddardconsulting.ca> wrote in message <i2obq8$ou5$1...@fred.mathworks.com>...

i also found it works!!
great
thanks

Art M

unread,
May 23, 2013, 2:25:07 AM5/23/13
to

> > >> hf = findall(0,'Name',get_param(gcb,'Name')); %handle to figure window
> > >> ha = findall(hf,'Type','axes'); %handle to axis
> > >> set(ha,'XGrid','on','YGrid','on') % trun the grid on

As stated above, this works after the XP plot window has been opened by the first run of the simulation. I'm sorry to belabor this old question, but how is it possible to consistently get this grid on the XY Simulink plot on the FIRST run of the simulation?

Thanks,
Art
0 new messages