Errorbar plot

Hi Daniel,

Yes, i tried import errorbar…i did this: import matplotlib.errobar , but occurred an error:

Exception Type:
ImportError
Exception Value:

No module named errobar

Thanks,

···

On Tue, Feb 22, 2011 at 3:59 PM, matplotlib-users-request@lists.sourceforge.net wrote:

Send Matplotlib-users mailing list submissions to

    matplotlib-users@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit

    [https://lists.sourceforge.net/lists/listinfo/matplotlib-users](https://lists.sourceforge.net/lists/listinfo/matplotlib-users)

or, via email, send a message with subject or body ‘help’ to

    matplotlib-users-request@lists.sourceforge.net

You can reach the person managing the list at

    matplotlib-users-owner@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific

than “Re: Contents of Matplotlib-users digest…”

Today’s Topics:

  1. Re: Histogram with single series - colour coding different

    ranges? (Benjamin Root)

  2. Errorbar plot (Wal?ria Antunes David)

  3. Re: Errorbar plot (Daniel Mader)

  4. Re: Plotting large data sets with Pylab (Benjamin Root)

  5. errorbar plot (Wal?ria Antunes David)

  6. MacOSX backend bug (Dominique Orban)


Message: 1

Date: Tue, 22 Feb 2011 10:12:54 -0600

From: Benjamin Root <ben.root@…83…1304…>

Subject: Re: [Matplotlib-users] Histogram with single series - colour

    coding different ranges?

To: Victor Hooi <victorhooi@…2652…>

Cc: matplotlib-users@lists.sourceforge.net

Message-ID:

    <AANLkTi=8_hMH3R7HUfS1H4JPk_y-PNfNY4rZ_RJd-Txb@...288...>

Content-Type: text/plain; charset=“iso-8859-1”

On Tue, Feb 15, 2011 at 11:07 PM, Victor Hooi <victorhooi@…9…> wrote:

heya,

Is there an easy way to colour-code a Matplotlib histogram with a single

set of data?

So for example, you’d have a bell-shaped histogram, and the middle 50%

might be green, the regions 20% to the left and right of that might be

yellow, and the 5% either side beyond that could be red.

I couldn’t seem to find anything in the Matplotlib options for this - any

suggestions?

Cheers,

Victor

Sure, check out the following:

import matplotlib.pyplot as plt

import numpy as np

xs = np.arange(20)

ys = np.random.rand(20)

cs = ([‘y’] * round(0.25 * len(xs))) + ([‘g’] * round(0.5 * len(xs))) +

([‘y’] * round(0.25 * len(xs)))

plt.bar(xs, ys, color=cs)

plt.show()

Admittedly, this isn’t using matplotlib’s hist() function because it only

allows for one color per dataset. However, you can use numpy’s histogram

function to get the bins and counts yourself, and then use bar() to make the

bars. bar() will allow you to color the bars individually.

I hope this helps!

Ben Root

-------------- next part --------------

An HTML attachment was scrubbed…


Message: 2

Date: Tue, 22 Feb 2011 13:13:53 -0300

From: Wal?ria Antunes David <waleriantunes@…287…>

Subject: [Matplotlib-users] Errorbar plot

To: Matplotlib Users matplotlib-users@lists.sourceforge.net

Message-ID:

    <AANLkTinNop0tGL-R0Cr4Box=TeXwzhW=xj+_iucE_JAH@...288...>

Content-Type: text/plain; charset=“iso-8859-1”

Hi all,

I have this line about errorbar plot, but i need a errorbar this:

http://img14.imageshack.us/i/exampled.jpg/ (in blue)

My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2,

marker=‘_’, linestyle=‘’, markeredgecolor=‘r’,color=‘r’, label=‘Pontos’)

Can you help me?

Thanks,

-------------- next part --------------

An HTML attachment was scrubbed…


Message: 3

Date: Tue, 22 Feb 2011 17:28:04 +0100

From: Daniel Mader <danielstefanmader@…982…>

Subject: Re: [Matplotlib-users] Errorbar plot

To: matplotlib-users@lists.sourceforge.net

Message-ID:

    <AANLkTikx--1b9m5Y6+3Sw2hXwWppVKmS_uCSd0M8noUs@...3221.....>

Content-Type: text/plain; charset=ISO-8859-1

Hi Wal?ria,

you should try to figure out the docstring help :slight_smile:

In a terminal (IDLE or IPython), just do

import matplotlib

matplotlib.errobar?

This will show you extensive help on the command.

You will also need to compare with the regular plot command:

matplotlib.plot?

Best regards,

Daniel

P.S. I cannot see what is wrong with your line. Change ‘r’ to ‘b’ and

the plot should be in blue.

2011/2/22 Wal?ria Antunes David <waleriantunes@…287…>:

Hi all,

I have this line about errorbar plot, but i need a errorbar this:

http://img14.imageshack.us/i/exampled.jpg/ (in blue)

My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2,

marker=‘_’, linestyle=‘’, markeredgecolor=‘r’,color=‘r’, label=‘Pontos’)

Can you help me?

Thanks,


Index, Search & Analyze Logs and other IT data in Real-Time with Splunk

Collect, index and harness all the fast moving IT data generated by your

applications, servers and devices whether physical, virtual or in the cloud.

Deliver compliance at lower cost and gain new business insights.

Free Software Download: http://p.sf.net/sfu/splunk-dev2dev


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Message: 4

Date: Tue, 22 Feb 2011 10:38:10 -0600

From: Benjamin Root <ben.root@…83…1304…>

Subject: Re: [Matplotlib-users] Plotting large data sets with Pylab

To: bgeorge98121@…9…

Cc: Bruno George <bgeorge98121@…287…>, Matplotlib Users

    <matplotlib-users@lists.sourceforge.net>

Message-ID:

    <AANLkTimzPCUO=L7dortnCEjrzeB6rktUhYyWhtCxo6rZ@...288...>

Content-Type: text/plain; charset=“iso-8859-1”

On Tue, Feb 22, 2011 at 10:30 AM, Bruno George <bgeorge98121@…287…>wrote:

Dear Benjamin,

Thanks for the observations. The speed wasn’t as large of a concern as

the Python’s ability to plot the volume of data in Windows… The Mac was a

MacBook Air laptop, 1.8GHz Intel dual core 64 bit processor while the

Windows desk side machine using an AMD64 3200+ 2.1 GHz processor running 32

bit Windows. Both machines have 2GB ram the Windows machine is using a

Nvidia GeForce 6200 graphics card and the Mac is using Intel on board

graphics. The hardware is fairly well matched by and large.

Here’s the error message from the PC:


Exception in Tkinter callback

Traceback (most recent call last):

File “C:\Python27\lib\lib-tk\Tkinter.py”, line 1410, in call

return self.func(*args)

File

“C:\Python27\lib\site-packages\matplotlib\backends\backend_tkagg.py”, line

245, in resize

self.show()

File

“C:\Python27\lib\site-packages\matplotlib\backends\backend_tkagg.py”, line

248, in draw

FigureCanvasAgg.draw(self)

File “C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py”,

line 394, in draw

self.figure.draw(self.renderer)

File “C:\Python27\lib\site-packages\matplotlib\artist.py”, line 55, in

draw_wrapper

draw(artist, renderer, *args, **kwargs)

File “C:\Python27\lib\site-packages\matplotlib\figure.py”, line 798, in

draw

func(*args)

File “C:\Python27\lib\site-packages\matplotlib\artist.py”, line 55, in

draw_wrapper

draw(artist, renderer, *args, **kwargs)

File “C:\Python27\lib\site-packages\matplotlib\axes.py”, line 1946, in

draw

a.draw(renderer)

File “C:\Python27\lib\site-packages\matplotlib\artist.py”, line 55, in

draw_wrapper

draw(artist, renderer, *args, **kwargs)

File “C:\Python27\lib\site-packages\matplotlib\lines.py”, line 540, in

draw

drawFunc(renderer, gc, tpath, affine.frozen())

File “C:\Python27\lib\site-packages\matplotlib\lines.py”, line 905, in

_draw_lines

self._lineFunc(renderer, gc, path, trans)

File “C:\Python27\lib\site-packages\matplotlib\lines.py”, line 986, in

_draw_solid

renderer.draw_path(gc, path, trans)

File “C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py”,

line 117, in draw_path

self._renderer.draw_path(gc, path, transform, rgbFace)

OverflowError: Agg rendering complexity exceeded. Consider downsampling or

decimating your data


Thanks for looking into my problem,

Bruno George

Bruno,

First, as a side note, even though your Windows machine is a 64-bit machine,

the fact is that you are running a 32-bit Windows, which will limit the

amount of memory any one process can use.

As for your error message, I believe that is actually something slightly

different than what I originally thought. Have you tried dealing with

path.simplfy? Which version of matplotlib are you running?

Ben Root

-------------- next part --------------

An HTML attachment was scrubbed…


Message: 5

Date: Tue, 22 Feb 2011 15:55:42 -0300

From: Wal?ria Antunes David <waleriantunes@…287…>

Subject: [Matplotlib-users] errorbar plot

To: Matplotlib Users matplotlib-users@lists.sourceforge.net

Message-ID:

    <AANLkTimZ2FV81Y0-NMFEmaC13Kc1epJ3frDyDMgcz6eD@...288...>

Content-Type: text/plain; charset=“iso-8859-1”

Hi all,

I have this line about errorbar plot, but i need a errorbar this:

http://img14.imageshack.us/i/exampled.jpg/ (in blue)

My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2,

marker=‘_’, linestyle=‘’, markeredgecolor=‘r’,color=‘r’, label=‘Pontos’)

Can you help me?

Thanks,

-------------- next part --------------

An HTML attachment was scrubbed…


Message: 6

Date: Tue, 22 Feb 2011 13:48:53 -0500

From: Dominique Orban <dominique.orban@…287…>

Subject: [Matplotlib-users] MacOSX backend bug

To: matplotlib-users@lists.sourceforge.net

Message-ID:

    <AANLkTikuVotGK=1g3PmhOdfn=rPcFD=XFMVoMVqVapa+@mail.gmail.com>

Content-Type: text/plain; charset=“utf-8”

Hi there,

$ uname -a

Darwin nazgul.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10

18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386

$ python -c ‘import matplotlib ; print matplotlib.version

1.0.1

I installed Matplotlib from Pypi.

I’m having two problems with the MacOSX backend:

  1. Plot windows systematically appear behind any other window. This

makes it difficult to find them.

  1. I can’t type anything in the save dialog box. The cursor blinks in

the text box, but any typing goes to the terminal. This is the same I

believe as http://old.nabble.com/save-dialogue-in-macosx-bug-p27966555.html

I attach a screenshot to explain more clearly what’s happening. Typing

‘filename’ in the save dialog box results in ‘filename’ being

displayed in the terminal window, where the red arrow points to.

This seems to be related to the MacOSX backend as switching to TkAgg

resolves #2 (#1 still happens).

Any ideas?

Dominique

-------------- next part --------------

A non-text attachment was scrubbed…

Name: Screen shot 2011-02-22 at 1.35.41 PM.png

Type: image/png

Size: 56951 bytes

Desc: not available



Free Software Download: Index, Search & Analyze Logs and other IT data in

Real-Time with Splunk. Collect, index and harness all the fast moving IT data

generated by your applications, servers and devices whether physical, virtual

or in the cloud. Deliver compliance at lower cost and gain new business

insights. http://p.sf.net/sfu/splunk-dev2dev



Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

End of Matplotlib-users Digest, Vol 57, Issue 70


Waléria Antunes David, on 2011-02-22 16:17, wrote:

Hi Daniel,

Yes, i tried import errorbar....i did this: import matplotlib.errobar , but
occurred an error: Exception Type: ImportError Exception Value:

No module named errobar

Hi Waléria,

there was a typo in Daniel's reply. The function is called
errorbar, not errobar. For the object-oriented interface, you can
find it attached to an Axes instance, or call the corresponding
convenience function from the pyplot interface.

  import matplotlib.pyplot as plt
  
  # object-oriented interface
  ax = plt.subplot(1,1,1)
  ax.errorbar?
  
  # pyplot (matlab-like) interface
  plt.errorbar?

As Daniel pointed out, the question mark will pull up the
docstring if you're using IPython, but if you aren't, you
can always call python's help.

  help(plt.errorbar)

which will print the docstring for you.

hope that helps,

···

--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7