Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'indices': 0.07; 'initialize': 0.07; 'grid': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'worked.': 0.09; '(x,': 0.16; '>does': 0.16; 'increment': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'size,': 0.16; 'shape': 0.19; 'input': 0.22; 'aug': 0.22; 'this?': 0.23; 'url:home': 0.24; 'header:X-Complaints-To:1': 0.27; 'point': 0.28; 'function': 0.29; 'array': 0.29; "doesn't": 0.30; 'steven': 0.31; 'anyone': 0.31; 'could': 0.34; 'convert': 0.35; 'skip:> 10': 0.36; 'charset:us-ascii': 0.36; 'christian': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'color': 0.61; 'times': 0.62; 'show': 0.63; 'ranges': 0.74; 'contour': 0.84; 'imagined.': 0.84; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Matplotlib Contour Plots Date: Tue, 19 Aug 2014 09:12:41 -0400 Organization: IISS Elusive Unicorn References: <2f9537da-86b8-441d-a214-00123b8416d1@googlegroups.com> <53ee09cd$0$29994$c3e8da3$5496439d@news.astraweb.com> <53ee2397$0$29966$c3e8da3$5496439d@news.astraweb.com> <5a0df87b-6271-48c5-93ec-39949ab7c192@googlegroups.com> <53f295e2$0$29970$c3e8da3$5496439d@news.astraweb.com> <6bc22f4f-1041-4ad4-9a8f-b0b6ec4bd009@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-216-17.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1408453949 news.xs4all.nl 2892 [2001:888:2000:d::a6]:56115 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76563 On Tue, 19 Aug 2014 01:43:54 -0700 (PDT), Jamie Mitchell declaimed the following: >You were right Christian I wanted a shape (2,150). > >Thank you Rustom and Steven your suggestion has worked. > >Unfortunately the data doesn't plot as I imagined. > >What I would like is: > >X-axis - hs_con_sw >Y-axis - te_con_sw >Z-axis - Frequency > >What I would like is for the Z-axis to contour the frequency or amount of times that the X-axis data and Y-axis data meet at a particular point or bin. > >Does anyone know what function or graph could best show this? > Sounds like a histogram on a function of (x, y) -- you may need to play with it to get tolerances suitable for binning, and calculate the Z by scanning the input data. What are the domain ranges of X and Y? How many bins in X and Y? initialize Z array [x-bins, y-bins] <- 0 for (x, y) in zip(x-data, y-data) convert x and y to bin indices increment Z[x-index, y-index] plot Z (mapped to a color scale, dot size, whatever) on a grid of x-bins, y-bins -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/