From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: one set of data with 4 types of information
Date: Mon, 29 Apr 2013 16:16:58 -0500
Organization: NNTP Server
Lines: 45
Message-ID: <klmnvo$jp4$>
References: <kllt7q$3pg$>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20120306 Thunderbird/3.1.20
X-Notice: Filtered by postfilter v. 0.8.2
Xref: comp.soft-sys.matlab:794576

On 4/29/2013 8:40 AM, Iris wrote:
> Hello!
> I need to do a HR Diagram like this one:
> Where each point have not just x and y but x1, y1, x2 and y2 (to each
> point i have 4 types of information).
> I want to put all the points in one graph where it shows the 4 types of
> information in 4 axes, like in the example from wikipedia.

> figure(1)
> ax1 = gca;
> line(HRx_c,HRy_m, 'LineStyle', 'o', 'Color', 'k', 'MarkerSize', 1);
> set(ax1,'ydir','reverse');
> ax2 = axes('Position',get(ax1,'Position'),...
> 'XAxisLocation','top',...
> 'YAxisLocation','right');
> line(HRx_t,log10(HRy_l),'LineStyle', 'o','Color','k','MarkerSize',
> 1,'Parent',ax2);
> set(ax2,'xdir','reverse');

> Like this it plots two sets of data, one in respect to one axes and
> other in respect to the second axes, which is not correct.
> Any ideia of how can i do this?

PLOTYY will give you two y-axes associated w/ an overlapping pair of 
x-axes at the bottom.  You can make the left of these semilog by either 
setting directly or using the handle form of the call.

As you have done, you can create the other x-axis at the top manually as 
long as you know the scaling...I'm not up enough on the details altho 
I've looked at these before just out of curiosity mostly to know what 
the upper axis scaling actually is, so can't say specifically about 
that.  The labeling above you'll have to do w/ text() at whatever 
determines those positions relative to the axis as they aren't 
equivalent to the tic marks.

It's basically a case of keep on adding components until you get 
something to represent each piece...