Ticket #8632: trac_8632_save_ignores_options_from_plot.patch

File trac_8632_save_ignores_options_from_plot.patch, 1.1 KB (added by novoselt, 10 years ago)
  • sage/plot/plot.py

    # HG changeset patch
    # User Andrey Novoseltsev <novoselt@gmail.com>
    # Date 1294940330 25200
    # Node ID 9dc831b617ec6562a2ea9ec46cf76cc7d53ff999
    # Parent  1a9516a8452d931b3a608ea1e6f597e36ee32086
    Trac #8632: Save should not ignore options passed from plot.
    
    diff -r 1a9516a8452d -r 9dc831b617ec sage/plot/plot.py
    a b  
    23942394
    23952395        By default, the figure grows to include all of the graphics and text,
    23962396        so the final image may not be exactly the figure size you specified.
     2397       
     2398        You can also pass extra options to the plot command instead of this
     2399        method, e.g. ::
     2400       
     2401            sage: plot(x^2 - 5, (x, 0, 5), ymin=0).save(
     2402            ...       sage.misc.misc.tmp_filename() + '.png')
     2403           
     2404        will save the same plot as the one shown by
     2405       
     2406            sage: plot(x^2 - 5, (x, 0, 5), ymin=0)
     2407           
     2408        (This test verifies that Trac #8632 is fixed.)
    23972409        """
    23982410        options = dict()
    23992411        options.update(self.SHOW_OPTIONS)