gramm plot with two y-axis

2 views (last 30 days)
Aminath shausan
Aminath shausan on 14 Sep 2018
Dear community, I am new to creating pots using gramm(). I am trying to create a figure with multiple subplots. Each subplot has two sets of y-axes (the left and right y-axes). Is there any way I can plot two sets of data on the same subplot using two y-axes with the gramm() function? If this is possible would like to use the facet_grid() option to facet all subplots.
Note: I can use MATLAB subplot() function to create the figure as follows, but the output is not good (due to spaces between subplots) when I put the figure into LaTeX document and produce a pdf.
figure for i = 1:N yyaxis left subplot(5,7,i) semilogy(X{i}, Y1{i}, 'r-'); yyaxis right plot(X{i}, Y2{i}, 'r-')

Answers (0)

Categories

Find more on Dates and Time in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!