William Stein wrote:
> On Wed, Jul 22, 2009 at 11:49 AM, Robert
> Bradshaw<rober...@math.washington.edu> wrote:
>> On Jul 22, 2009, at 11:24 AM, William Stein wrote:
>>
>>> On Wed, Jul 22, 2009 at 11:19 AM, Ethan Van
>>> Andel<evlu...@gmail.com> wrote:
>>>> In list_plot there's some confusion with the pointsize and thickness
>>>> keyword arguments.
>>>>
>>>> These 2 commands run just fine.
>>>> list_plot([(0,0),(1,1)],thickness = 20,plotjoined = true)
>>>> list_plot([(0,0),(1,1)],pointsize = 20,plotjoined = false)
>>>>
>>>> This one runs but ignores thickness and gives you a warning saying
>>>> that it is ignoring thickness.
>>>> list_plot([(0,0),(1,1)],thickness = 20,plotjoined = false)
>>>>
>>>> This one doesn't run at all but gives you an invalid option error.
>>>>
>>>> This behavior is needlessly finnicky, especially when writing
>>>> functions that call list_plot with user supplied parameters. For
>>>> example, this method would fail half of the time.
>>>>
>>>> def foo(size,joined):
>>>>    return list_plot(mydata,pointsize = size, plotjoined = joined)
>>>>
>>>> My first thought for a fix was to make the arguments interchangable,
>>>> ie thickness = 5 and pointsize = 5 would do the same thing in both
>>>> joined and discrete plots. However, they don't actually behave the
>>>> same. For example, the line drawn with thickness = 20 is much thicker
>>>> than a point with pointsize = 20. Therefore, if they were to be
>>>> merged
>>>> in some way what would be the best way to go about it?
>>> I have always found the value of pointsize to be very mysterious.  I
>>> wonder if we
>>> could make it so pointsize=20 and thickness=20 are the same.  This
>>> would of course
>>> break all existing use of pointsize, but at least it would make sense.
>>>
>>> I have heard many people chuckle when wondering what the pointsize
>>> units are.


I believe it is the same as matplotlib:

http://matplotlib.sourceforge.net/api/axes_api.html?highlight=scatter#matplotlib.axes.Axes.scatter

"size in points^2."

so pointsize=100 corresponds to 10 points, I think.

I think "pointsize" refers to (a constant times) the area of the plotted 
point, which is not to be confused with "point", the unit of measurement 
(1/72 of an inch or something).

At least, that's what I think after looking at the source for about 1 
minute.  I may be just making this all up :).

I remember puzzling over this before too.

Thanks,

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to