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

How to resize plot() #175

Closed
palango opened this issue Sep 27, 2014 · 4 comments
Closed

How to resize plot() #175

palango opened this issue Sep 27, 2014 · 4 comments

Comments

@palango
Copy link

palango commented Sep 27, 2014

I'm trying to resize a figure done with plot.
The following is the following code, however that only opens a new figure with the desired size but the saved file has default dimensions.

  figure(width=1000, height=300)
  plot([1:length(c)], c)
  #setattr(p, width= 1000)
  savefig("figure.pdf")
@nolta
Copy link
Member

nolta commented Sep 29, 2014

You can pass width & height options to savefig. Not a bad idea for savefig to use the current figure size as its default.

@palango
Copy link
Author

palango commented Oct 1, 2014

Thanks, that should be added to the docs. However my files now have the right size, but are empty. What am I doing wrong?

    using Winston
    x = linspace(0,2*pi, 100)
    plot(x, sin(x))
    savefig("abc.png", width=300, height=100)

@nolta nolta closed this as completed in ed224e8 Oct 2, 2014
@palango
Copy link
Author

palango commented Oct 3, 2014

How can I use the updated version? Will you release a updated version or should I use the HEAD for the time being?

@palango
Copy link
Author

palango commented Oct 3, 2014

Just saw that a new version is already out. Sorry for the noise!

grero pushed a commit to grero/Winston.jl that referenced this issue Nov 9, 2015
- Document savefig width/height options.
- Fix _pwinston initialization bug.
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