Peter Würtz wrote:
> Hi,
>
> Sorry this might look like a really stupid question, but I have not been
> able to find an answer in the matplotlib documentation...
Not a stupid question at all--it is more of a feature request.
>
> When plotting data points using the "o"-style, some points are truncated
> by the axis borders. Is there a way to define some kind of margin
> without changing the x/y range manually?
No, this is something we probably should add. There are other cases
also where one wants a margin by default.
>
> So far, I did some kind of workaround:
> (xmin,xmax) = p.xlim()
> xw = xmax - xmin
> p.xlim(xmin - xw*0.05, xmax + xw*0.05)
>
> Is there a better way than this?
No, it looks to me like you have found a reasonable workaround. One
could also put this functionality into a custom Locator class, but that
is more complicated.
Eric
>
> Thanks,
> Peter
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|