Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76498

Re: Matplotlib Contour Plots

From Christian Gollwitzer <auriocus@gmx.de>
Newsgroups comp.lang.python
Subject Re: Matplotlib Contour Plots
Date 2014-08-18 19:49 +0200
Organization A noiseless patient Spider
Message-ID <lsteb8$qtd$1@dont-email.me> (permalink)
References (2 earlier) <2f9537da-86b8-441d-a214-00123b8416d1@googlegroups.com> <53ee09cd$0$29994$c3e8da3$5496439d@news.astraweb.com> <c3ca3710-a481-43c2-a2b8-e4105d7160ac@googlegroups.com> <53ee2397$0$29966$c3e8da3$5496439d@news.astraweb.com> <ce4ee9aa-1ea1-45a3-83ff-e4ed017b4c5f@googlegroups.com>

Show all headers | View raw


Am 18.08.14 18:51, schrieb Jamie Mitchell:
> On Friday, August 15, 2014 4:13:26 PM UTC+1, Steven D'Aprano wrote:
> So I have two 1D arrays:
>
> 1st array - ([8, 8.8,8.5,7.9,8.6 ...], dtype=float32)
>
> It has a shape (150,)
>
> 2nd array - ([2, 2.2, 2.5, 2.3, ...],dtype=float32)
>
> It has a shape (150,)
>
> What I want to do is create a 2D array which merges the 1st and 2nd array so that I would have:
>
> ([[8, 8.8,8.5,7.9,8.6 ...],[2,2,2,2,5,2.3, ...]], dtype=float32) that would have a shape (150,150)

There is a logical error in your description. This array would not have 
the shape (150,150), but (2,150).

> In this form I could then plot a 2D contour.

An image with 150x150 pixels has in total 150x150=22500 pixels. You've 
got only 300 datapoints. So it's very unclear what you want to do. A 
"contour plot" displays lines of equal height over a two-dimensional 
dataset, as in a topographic map. You don't seem to have a 
two-dimensional dataset at first place; maybe you already have *contour 
data*, and you just want to plot(x,y) ?

	Christian

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Matplotlib Contour Plots Jamie Mitchell <jamiemitchell1604@gmail.com> - 2014-08-14 08:22 -0700
  Re: Matplotlib Contour Plots Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-15 02:53 +1000
    Re: Matplotlib Contour Plots Jamie Mitchell <jamiemitchell1604@gmail.com> - 2014-08-15 04:54 -0700
      Re: Matplotlib Contour Plots Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-15 23:23 +1000
        Re: Matplotlib Contour Plots Jamie Mitchell <jamiemitchell1604@gmail.com> - 2014-08-15 07:42 -0700
          Re: Matplotlib Contour Plots Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-16 01:13 +1000
            Re: Matplotlib Contour Plots Jamie Mitchell <jamiemitchell1604@gmail.com> - 2014-08-18 09:51 -0700
              Re: Matplotlib Contour Plots Jamie Mitchell <jamiemitchell1604@gmail.com> - 2014-08-18 09:55 -0700
                Re: Matplotlib Contour Plots Rustom Mody <rustompmody@gmail.com> - 2014-08-18 10:16 -0700
                Re: Matplotlib Contour Plots Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-19 10:10 +1000
                Re: Matplotlib Contour Plots Jamie Mitchell <jamiemitchell1604@gmail.com> - 2014-08-19 01:43 -0700
                Re: Matplotlib Contour Plots Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-08-19 09:12 -0400
                Re: Matplotlib Contour Plots pecore@pascolo.net - 2014-08-19 23:21 +0200
                Re: Matplotlib Contour Plots Jamie Mitchell <jamiemitchell1604@gmail.com> - 2014-08-20 03:02 -0700
                Re: Matplotlib Contour Plots Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-20 17:55 +0100
              Re: Matplotlib Contour Plots Christian Gollwitzer <auriocus@gmx.de> - 2014-08-18 19:49 +0200
          Re: Matplotlib Contour Plots Anssi Saari <as@sci.fi> - 2014-08-18 13:37 +0300

csiph-web