0
$\begingroup$

a and b are two sets ( fake data) which have same scale for x-axis but different y-axis scales. I need to merged both data plotting in a single frame ( let's say set a-> y-axis on left and set b-> y-axis on right vertical axis of that frame). Please give me the idea.

ClearAll[a, b, y, z]
a = {{0.5, 2}, {1, 5}, {1.5, 7}, {2, 8}, {2.5, 8.5}};
b = {{0.5, 1005}, {1, 1100}, {1.5, 1125}, {2, 1200}, {2.5, 1400}};
y = ListLinePlot[a, PlotLabel -> "real", 
PlotRange -> {{0, 3}, {1, 10}}, PlotStyle -> {Red}, Frame -> True]
z = ListLinePlot[b, PlotLabel -> "real", 
PlotRange -> {{0, 3}, {900, 1500}}, PlotStyle -> {Green}, 
Frame -> True]
Show [z, y]
$\endgroup$
  • $\begingroup$ Hi Edmund, thanks for the sources to solve it. When i use that for the problem i posted above, for the y=Listlineplot , there is no problem but for the z= listlineplot, i could only see the x-scales value ranging from 0 to 3 but couldn't see the right y-axis value. On the right y-axis, i can see only the scales with out the value ( range from 900 to 1500). Please give me idea $\endgroup$ – rabink Jan 6 '18 at 18:22
  • $\begingroup$ Try this ListLogPlot[{a, b}, PlotRange -> All, Joined -> True, Frame -> True, FrameTicks -> All] and see also the link mathematica.stackexchange.com/questions/158125/… $\endgroup$ – mrz Jan 6 '18 at 22:15

Browse other questions tagged or ask your own question.