[yt-dev] Why does ProjectionPlot not take and pass **kwargs

Yi-Hao Chen yihaochentw at gmail.com
Wed Dec 21 13:37:09 PST 2016


On Wed, Dec 21, 2016 at 3:04 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

>
>
> On Wed, Dec 21, 2016 at 2:55 PM, Yi-Hao Chen <yihaochentw at gmail.com>
> wrote:
>
>> Hi all,
>>
>> I am wondering why ProjectionPlot (and others) do not take all the
>> keyword arguments and pass them to PWViewerMPL and PlotWindow. For example,
>> currently there is no way to set buff_size at the creation of a plot. One
>> has to call .set_buff_size after the plot was created.
>>
>> I am thinking about leaving only the arguments specific to ProjectionPlot
>> explicitly, and use **kwargs to pass all other arguments to PlotWindow. But
>> if there are reasons not to do this, please let me know.
>>
>
> This is on purpose, to reduce the API complexity. ProjectionPlot already
> has a huge number of keyword arguments, adding more will only make it
> harder to discover functionality.
>

I see. That make sense.

>
> I'd be much more interested in figuring out ways to make the setters more
> intuitive - possibly by exposing plot attributes as descriptors?
>

I have no idea how to implement the descriptors...

>
>
>>
>> Thanks!
>> Yi-Hao
>>
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>
>>
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20161221/aeba9961/attachment.html>


More information about the yt-dev mailing list