[matplotlib-devel] Plot line style cycle?

2011-08-25 Thread Benjamin Root
I am currently in the process of a paper submission, and the page charge
estimation took us for a bit of a surprise.  Luckily, most of my plots don't
need color, and I would like to regenerate them in b&w mode.

Is there some default line style cycle (I.e., ['-', '.', '--', '.-']) that
can be set analogous to the color cycle used by default?

Thanks,
Ben Root
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Bug with bbox_inches='tight' on Python 3

2011-08-25 Thread Michael Droettboom
On 08/24/2011 01:41 PM, Michael Droettboom wrote:
> On 08/24/2011 11:07 AM, Grahame Bowland wrote:
>
>> Another thing - I think I've found a str/bytes bug which I can't
>> figure it out. I've attached the code, if I run it on my machine I get
>> this output:
>>
>> Traceback (most recent call last):
>> File "crash.py", line 24, in
>>   fig.canvas.print_figure(open('test.png', 'wb'), bbox_inches='tight')
>> File 
>> "/opt/shrubbery/lib/python3.2/site-packages/matplotlib/backend_bases.py",
>> line 1951, in print_figure
>>   bbox_inches = self.figure.get_tightbbox(renderer)
>> File "/opt/shrubbery/lib/python3.2/site-packages/matplotlib/figure.py",
>> line 1292, in get_tightbbox
>>   for ax in self.axes:
>> File "/opt/shrubbery/lib/python3.2/site-packages/matplotlib/figure.py",
>> line 290, in _get_axes
>>   return self._axstack.as_list()
>> File "/opt/shrubbery/lib/python3.2/site-packages/matplotlib/figure.py",
>> line 59, in as_list
>>   ia_list = [a for k, a in self._elements]
>> File "/opt/shrubbery/lib/python3.2/site-packages/matplotlib/figure.py",
>> line 59, in
>>   ia_list = [a for k, a in self._elements]
>> TypeError: string argument expected, got 'bytes'
>>
>> It's definitely something to do with the bbox_inches='tight' argument,
>> if I take that out everything works. Using the debugger I can't see
>> anything in any stack frame that explains the traceback - really odd!
>>
> Can you file an issue for this in the matplotlib-py3 github project?
> I'm busy getting the matplotlib 1.1.x release finished up at the moment,
> and don't have a working environment for Python 3 right now.  I'd hate
> for this bug to fall through the cracks.
>
Indeed a confusing bug -- errors were not being returned correctly from 
the PNG extension.

Can you confirm that

https://github.com/matplotlib/matplotlib-py3/commit/927acf856bb321e22938846bb39f8b32d90172d4

resolves the issue?

Mike

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Plot line style cycle?

2011-08-25 Thread Eric Firing
On 08/25/2011 04:09 AM, Benjamin Root wrote:
> I am currently in the process of a paper submission, and the page charge
> estimation took us for a bit of a surprise.  Luckily, most of my plots
> don't need color, and I would like to regenerate them in b&w mode.
>
> Is there some default line style cycle (I.e., ['-', '.', '--', '.-'])
> that can be set analogous to the color cycle used by default?

Something like this came up a while ago as a feature request--same sort 
of motivation, I think--but it was never implemented.

You could make a little function that would operate on line objects, 
changing colors from the color cycle to black while using those colors 
to specify line styles.

Eric

>
> Thanks,
> Ben Root

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel