**one scatter plot with 2 x axis and 2 y axis, one of the x axis being a function of the first x axis**Hello to all!
I'm trying to do a Hertzsprung-Russell diagram like this one: http://en.wikipedia.org/wiki/File:HRDiagram.png
If you see, the temperature (top x axis) is not a linear function of the color (bottom x axis), and i cant find a way to do this.
My code:
% to read the stars data:
filename = 'Hipparcos_stars2.xlsx';
sheet1 = 1;
xHRcolor = 'G2:G19934';
yHRmag = 'I2:I19934';
xHRtemp = 'J2:J19934';
yHRlum = 'K2:K19934';
HRx_c = xlsread(filename, sheet1, xHRcolor);
HRy_m = xlsread(filename, sheet1, yHRmag);
HRx_t = 10.^(3.9396...

**2 y-axis plots on one plot**All,
I have 2 functions that share the same domain but have different
ranges
e.g.
f1(x) = function that outputs magnetic field (gauss)
f2(x) = function that outputs size (meters)
..
I've seen graphs where the left vertical axis is for one function, and
the right vertical axis is for the other. The domain (horizontal) axis
is the same for both. Is there a nice way to do this in Matlab?
Thanks!
On Jun 1, 3:41=A0pm, olsonaj <Abraham.Ol...@gmail.com> wrote:
> All,
>
> I have 2 functions that share the same domain but have different
> ranges
>
> e.g.
>
> f1(...

**Plot two graphs on same figure with two x-axes and one shared y-axis**I just wanted to plot two different functions, for simplicity let's say: 1. price in USA; and 2. price in India, as a function of weight. Now, I want this weight to be represented in pounds (popular in USA) as well as kilograms (popular in India), as two different x-axes, one on top of the graph while another on bottom of the graph. However, I want only single y-axis to compare the graphs of 'price in USA' and 'price in India'.
Is that possible in Matlab? I tried plotyy but it creates two y-axes for a single x-axis.
Any help is greatly appreciated. Thanks.
...

**Putting 2 graphs from 2 different m files into one plot**Hello,
I have some m Files (4 to be exact) each generates a semilog graph.
I want all 4 curves to appear on the same semilog graph
I cant just put all the code in one file because there are alot of common variables.
Thanks
"Shadi Philip" <shadi.phi@hotmail.com> wrote in message <gubv1p$aum$1@fred.mathworks.com>...
> Hello,
>
> I have some m Files (4 to be exact) each generates a semilog graph.
> I want all 4 curves to appear on the same semilog graph
>
> I cant just put all the code in one file because there are alot of common variables.
>
>...

**2 plot in one figure?**Hi folks;
I am trying to plot 2 figures in one figure. In MATLAB we have a
function named POLYY and we can plot 2 figures (2 Y) in one figure. I
want to plot this 2 plot in one figure in IDL whit different scale
first one is ordinary and second one logarithmic. Thanks for any help
in advance.
Cheers
Dav
On Nov 28, 8:09 am, d.po...@gmail.com wrote:
> Hi folks;
> I am trying to plot 2 figures in one figure. In MATLAB we have a
> function named POLYY and we can plot 2 figures (2 Y) in one figure. I
> want to plot this 2 plot in one figure in IDL whit different scale
> first one is...

**2 plots in one figure**Hi, I'm a beginner in matlab... can you tell me how to put a scatter
plot and function plot into one figure? Thanks
ushy wrote:
>
>
> Hi, I'm a beginner in matlab... can you tell me how to put a
> scatter
> plot and function plot into one figure? Thanks
Try the following
help plotyy
rf
ushy wrote:
> Hi, I'm a beginner in matlab... can you tell me how to put a scatter
> plot and function plot into one figure? Thanks
Use
% first plot
hold on;
% second plot
HTH
-rajeev-
Try the following:
figure
hold on;
grid on;
plot(xs,yx,'bx')
p...

**2 Graphs in one plot**Hi,
I want to plot 2 graphs (that depends on the same variable) in one plot
but with different scales for y, so plot "plot1", "plot2" is not
possible. The scales should appear on the left an right side of the
plot.
To explain what I want to do, here is a small example:
set multiplot
set border 3
set xtics nomirror
set ytics nomirror
plot [0:10] sin(x)
set logscale y2
unset ytics
set y2tics border nomirror
set border 9
plot [0:10] log(x)
unset multiplot
pause -1
The problem is, that the x-axis is not syncronized, because, the axis
labels are on dif...

**PLOT two graphs in one figure?**Hi,
Does anyone know of a way to plot two vectors in one figure so that one plot is
on top of the other? One plot could be blue, and the other could be red so that
it's easy to distinguish between the two.
Thanks in advance!
In article <g534r5$eto$1@fred.mathworks.com>,
Jack Branning <jbr.nospam@nospam.com> wrote:
>Does anyone know of a way to plot two vectors in one figure so that one plot is
>on top of the other? One plot could be blue, and the other could be red so that
>it's easy to distinguish between the two.
plot(x1,y1,'b',x2,y2,'r'...

**two plots in one figure #2**Dear Firends,
Sometimes i see a graph made by Matlabe that contains two
plots((This is not a subplot figure!)) by which i mean they
opened a figure; then they plot some data, and the put a
specific rage of data, let say zoom in a specific part of
graph, as a individual graph in the corner of figure!
Do you have any idea, how it possible?
Thanks
"karlo gonzales":
<SNIP plot-in-plot...
one of the many solutions
% the big guy
plot(rand(1,10));
% the little guy
axes('position',[.5,.5,.3,.3]);
line(1:10,rand(1,10));
box on;
us
...

**plotting data**Hello, I'm a new user to matlab and I would like to write a script
for plotting data like in figure 2, but without the line between the
subplots (see link below). Currently I manage to get figure 1. Can
anyone help me with this ? Thanks a lot. Vincent.
<http://www.evavincent.be/mlab/1.tif>
<http://www.evavincent.be/mlab/2.tif>
A simple (but not elagent) solution would seem to be to use 'hold
on;' command to plot the two graphs in the same figure. You can just
add an offset to the graph above to get it to look at 2.tif Then to
get rid of y axis labels use 'set(gca...

**how to Plot 3 graph in one figure**Hi
I need your help, and your help would be really appreciated. Thanks.
I ran in to a problem, I need to plot a graph with the below features.
I have a series of X data and corresponding to these Xs, I have 3 series of Ys.
I have to plot these data which would be 3 graphs in just a single Figure.
So I need a command in MATLAB which can plot 3 graphs with 3 different scales in a single figure.
On the other hand, I need those y axes in the logarithmic scale.The x axis is in the linear scale.
any idea would be ok...
here is a sample picture:
http://i741.photobucket.com/albums...

**plotting 2 curves in one figure**hello all
i know I can use the hold on / all to plot 2 plots in one figure.
but what if I have a pre-defined function that plot for me. and the thing is that each time it is plotting it plots it on a new figure. is the ea way to plot it on a the same figure?
the function is:
function SpectrumAnalyzer(InputArray,Fs)
Yaxis=abs(fftshift(fft(InputArray)));
Yaxis=Yaxis.*Yaxis;
v=size(Yaxis);
if v(1)==1
V=size(Yaxis,2);
Xaxis=-Fs/2+Fs/V:Fs/V:(Fs/2);
else
V=v(1);
Xaxis=-Fs/2+Fs/V:Fs/V:(Fs/2);
Xaxis=Xaxis.';
end
Yaxis=10*log10(Yaxis*4/(V.*V));
% figure ------------> i actually chan...

**Handling 2 Graphs in one figure**Hi all,
I have created 2 graphs(linear lines) on 1 figure. I need to mark the
area between the lines.
Is there a function that can do it?
Thanks,
Jon.
Hi!
You could do it like this:
%first graph
area(1:10, 1:10, 'facecolor', 'b');
hold on;
%second graph
area(1:10, 0.5:0.5:5, 'facecolor', 'w');
Konstantin
Jon wrote:
> Hi all,
>
> I have created 2 graphs(linear lines) on 1 figure. I need to mark the
> area between the lines.
> Is there a function that can do it?
>
> Thanks,
> Jon.
...

**plot more than one figures at the same time #2**Dear all,
How can one draw more than one figure at the same batch session of the
gnuplot?
For instance, I would like to plot all of these figures at the same
time:
splot 'mode1_matrix.dat' matrix with pm3d
#replot
#splot 'mode2_matrix.dat' matrix with pm3d
#replot
#splot 'mode3_matrix.dat' matrix with pm3d
#replot
#splot 'mode4_matrix.dat' matrix with pm3d
#replot
#splot 'mode5_matrix.dat' matrix with pm3d
#replot
#splot 'mode6_matrix.dat' matrix with pm3d
#replot
#splot 'mode7_matrix.dat' matrix with pm3d
#replot
...

**plotting in matlab**hello,
i have a probably very simple question, all i try to do is plotting
multiple graphs that also have the same scale in one figure - but
giving them different colour and caracter. i aditionally want to
devide the graph at one point (lets say y=10) with a red line...
i have the graphs as five (1,48) matix. and i would like to smothen
the graph using something like spline...
i have tried figuring this with matlab help - but it is out of my
scope
does anyone know an example that i can look at so i can figure how to
code this??? this is my first contact with matlab and i am not too
comforta...

**two tendencies plot for the left Y axis and one bar plot for the right axis ?**Hi all,
I am wondering if you can provide some solutions. How to draw two tendencies plot for the left Y axis and 1 bar plot for the right axis?
Thank you very much.
Michael
"Kuo-Hsien" <mchangks@hotmail.com> wrote in message
news:i7vgc8$33h$1@fred.mathworks.com...
> Hi all,
>
> I am wondering if you can provide some solutions. How to draw two
> tendencies plot for the left Y axis and 1 bar plot for the right axis?
Use PLOTYY with six input arguments, the fifth being the handle to the
function that draws the "two tendencies" plot and the sec...

**Re: One Graph: 2 Lines, 2 Scatters, 2 y-axes, 4 colors #2**Stats
I am logged on from home and cannot do cut and paste so the following is untested code.
First, change the first three y variables to a single variable and create a new variable to distinguish the three lines. Say
Y = Y1; Line = 1;output;
Y = y1; Line = 2;output;
Y = Y3; line = 3;output;
Drop y1 y2 y3;
Now you plot statement should look something like
Proc Gplot;
Plot Y* Date = Line;
Plot2 Y4 * Date ;
Symbol1 Color = Blue I = Join;
Symbol2 Color = Green I = Join;
Symbol3 color = Black V = Star;
Symbol4 Color = Red V = star;
Run;
Quit;
You will most ...

**basic question about plotting 2 functions in one graph**Hi,
if I write something like this
Plot[{3n, 2.6n}, {n, 0, 100000}]
how can I distinguish them? How can I plot one of them green and one of them
red (for example)? How can I write the function on the graph?
THX
Hi,
Plot[{3n, 2.6n}, {n, 0, 100000},
PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 1, 0]},
Epilog -> {{RGBColor[1, 0, 0],
Text["Some curve", {20000, 250000}, {-1, 0}]},
{RGBColor[0, 1, 0],
Text["Some other curve", {20000, 200000}, {-1, 0}]}}
]
Regards
Jens
Ron Haus wrote:
>
> Hi,
> if...

**2 plots different sample points in one Graph**Hi,
I am trying to draw 2 different Filter measurement outcome (insertion loss) on one graph. The 2 data have partly common sample frequency points.
Both have varying not common frequency sample points (resolution) within the whole range. One has about 2100 sample points between 100 MHz-6GHz the other one about 1246 sample points between 120 MHz-6GHz
How can I still make a graphically comparison between those two measurements and be confident? Maybe interpolation between the sample points?
Thanks
Yariv
Hi Kenny,
I have LV7.1. ...

**Plotting 3 series for 2 groups in one graph.**Hi
I would like to plot survival distribution and lower and upper CI for two
groups (with treatment and without treatment) in one graph. Data are stored
in one file with 4 variables (survival, lower, upper) and treatment=1 for
the treated group and treatment=2 for the untreated group. How do I do that?
I have been trying this:
Proc gplot data=surv;
Plot low*time=1 suvirval*time=2 upper*time=3/overlay;
By treatment;
Run;
Quit;
It generates two graphs and not one, because of by statement. If I use plot2
statement it is possible to plot low...

**Plotting 3 series for 2 groups in one graph**/*
Erik Christiansen asked:
>From: Erik Christiansen <ec@SELVMORDSFORSKNING.DK>
>Subject: Plotting 3 series for 2 groups in one graph.
>Hi
>I would like to plot survival distribution and lower and upper CI for two
>groups (with treatment and without treatment) in one graph. Data are
stored
>in one file with 4 variables (survival, lower, upper) and treatment=1 for
>the treated group and treatment=2 for the untreated group. How do I do
that?
>I have been trying this:
>Proc gplot data=surv;
> Plot low*time=1 suvirval*time=2 upper*time=3/overlay;
> By ...

**Re: plotting multiple curves on one graph #2**Syb it
Here is the way that I would do this
data have;
input id prodb prodc;
value = prodb;
curve = 'ProdB';
output;
value = prodc;
curve = 'ProdC';
output;
keep id value curve;
datalines;
1 0 1
2 1 1
3 2 1
4 0 2
5 1 1
6 0 2
7 1 2
8 0 3
9 0 1
10 1 1
11 1 2
12 0 4
13 0 2
14 0 3
15 2 1
;;
run;
Proc sort;
by curve id;
proc print data=have; run;
Proc gplot;
plot value * id = curve;
symbol1 ...

**Plot XY graph from 2 input... Problem: At the same position, the graph still shows 2 value of y!**I have to plot XY graph, the graph move from left to right and then right to left.....But it got problem: At the same position, the graph still shows 2 value of y. I don't know how to update new value , and delete the previous value for y. Any one has a good example?
xy_radom_graph_show.vi:
http://forums.ni.com/attachments/ni/170/280936/1/xy_radom_graph_show.vi
pic1.JPG:
http://forums.ni.com/attachments/ni/170/280936/2/pic1.JPG
OK, you are doing this all way too complicated.
- Why do you need to keep three identical x arrays, one is enoug...

**Plotting a graph with one X-axis and two Y-axes**Hi, I am trying to create a graph with a single X-axis and two Y-axes
corresponding to a width, height, and length of a rectangular box. I
am trying to plot various combinations of these such that they
correspond to the box volume of <40 cm3. In other words, I would like
to print a graph such that someone can measure the sides of the box and
look these up in the graph and know whether the volume is less than 40
cm3. I don't quite know how to implement this in Mathematica as I am
pretty new at this.
Thank you in advance for your help.
Sincerely,
Igor
...