1
$\begingroup$

I used the Graphics->New Graphic, then the Drawing Tools to create this in my notebook.

enter image description here

Now, you can see that there is wasted whitespace above and below my line. I tried dragging all the sides and corners, but the effect is the same, What I want to do is narrow the vertical size of the window only, eliminating some whitespace.

Anyone know how to do this?

$\endgroup$
4
  • $\begingroup$ You can Ctrl+Drag to do clipping style operations. $\endgroup$
    – Yves Klett
    Dec 8, 2015 at 8:16
  • $\begingroup$ @Kuba why not elaborate on the programmatic options? I guess the Shrinkwrap->True hack should be applicable here, too. $\endgroup$
    – Yves Klett
    Dec 8, 2015 at 9:05
  • $\begingroup$ @YvesKlett I really don;t like drawing tools :P I just wanted the question to be answered and I would really choose your answer. Feel free to include that way too. $\endgroup$
    – Kuba
    Dec 8, 2015 at 9:07
  • $\begingroup$ David, was that what you were after? $\endgroup$
    – Yves Klett
    Dec 21, 2015 at 12:32

1 Answer 1

2
$\begingroup$

You can press down Ctrl while dragging to do clipping-style manipulations:

enter image description here

More convenient might be a programmatic way, e.g. using:

Show[graphics, Method -> {"ShrinkWrap" -> True}]

However, this method does not really work well with text (that tends to be cut off), so sometimes a bit of manual dragging might be in order anyway.

$\endgroup$
1
  • $\begingroup$ Nice answer. Thank you very much. $\endgroup$
    – David
    Dec 22, 2015 at 2:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.