Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotyy problem #9

Closed
bene86 opened this issue Jan 26, 2011 · 4 comments
Closed

plotyy problem #9

bene86 opened this issue Jan 26, 2011 · 4 comments

Comments

@bene86
Copy link
Contributor

bene86 commented Jan 26, 2011

another problem: i want do a bodeplot with gain and phase in one diagram, hence using plotyy. In Matlab everything looks fine, y-axis on the left for gain, y-axis on the right for phase and one x-axis on the bottom for time. All axises with labels. That's how it looks fine for me and i would like to have it.
But after converting to tikz, there is an additional x-axis at the top (it's just the numbers at the ticks i don't like) and much worse the labels for both y-axises are on the left side overlapping each other. I already had a look into the tikz-file and played around a little bit, but i hardly know the syntax of pgfplots so i don't even know if it is easy to implement how i think it should be.

@nschloe
Copy link
Member

nschloe commented Jan 26, 2011

Please provide the exact MATLAB(R) script you use to generate the figure. That way it's much easier for me to check out what goes wrong.

@bene86
Copy link
Contributor Author

bene86 commented Jan 26, 2011

ok, for example here:

x=0:.01:2_pi;
H=plotyy(x,sin(x),x,3_cos(x));
ylabel(H(1),'sin(x)')
ylabel(H(2),'3cos(x)')
xlabel(gca,'time')
matlab2tikz('filename','test.tikz')

the in test.tikz both y-labels are on the left overlapping each other, however the ticks of both y-axises are at the correct place. and furthermore at the top x-axis-ticks their corresponding numbers have been included.

@nschloe
Copy link
Member

nschloe commented Jan 26, 2011

I added a test function and the overlap problem is fixed.

@bene86
Copy link
Contributor Author

bene86 commented Jan 27, 2011

yes, it works for me now as well. It was my fault in my test latexfile i forgot to write \pgfplotsset{compat=newest}

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants