stuartornum wrote:
> Also what does rand(3,3) actually produce? is it a list, dict, im not really
> sure.
Since you are using Python, you can just ask it:
>>> import numpy as np
>>> help(np.random.rand)
Help on built-in function rand:
rand(...)
Return an array of t
AH HA!
Pete, you are a life saver! Thank you so much for all your help !
--
View this message in context:
http://www.nabble.com/Contour-Contourf-Plot-Heatmap---Grid---Multiple-Items-tp18872991p1931.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
---
try this:
list = numpy.array([0.66877509, 0.58785363, 0.32387598, 0.16877509,
0.48785363,
0.22387598, 0.96877509, 0.18785363, 0.52387598])
Pete
2008/8/8 stuartornum <[EMAIL PROTECTED]>
>
> Thanks again Pete for your help.
>
> I have numpy imported, and here is what my code looks like:
>
> #
Thanks again Pete for your help.
I have numpy imported, and here is what my code looks like:
import matplotlib
import numpy
from numpy import *
from pylab import *
list = [0.66877509, 0.58785363, 0.32387598, 0.16877509, 0.48785363,
0.22387598, 0.96877509, 0.18785363
rand() produces a numpy array, so long as numpy is imported into the
namespace.
I was simply using the random numbers as example data.
In your case you would take your 1x100 vector of heat data and re-shape it
to a 10x10 array. data=data.reshape(10,10)
Pete
2008/8/8 stuartornum <[EMAIL PROTEC
Hi Pete / All,
Thank you for the help so far, really appreciate it.
I have managed to plot the graph above using the code you gave me:
###
z=rand(3,3)
pcolormesh(z)
colorbar()
savefig('colour.png')
###
However, I am trying to find out what rand() actually does
That looks perfect, how did you do it?
Thanks
kippertoffee wrote:
>
> here's an example of pcolormesh on a random 10x10 array
>
> http://www.nabble.com/file/p18874393/spam2.png
>
>
> stuartornum wrote:
>>
>> Hi Pete,
>>
>> Thanks for the quick response.
>>
>> Will imshow() actually plo
here's an example of pcolormesh on a random 10x10 array
http://www.nabble.com/file/p18874393/spam2.png
stuartornum wrote:
>
> Hi Pete,
>
> Thanks for the quick response.
>
> Will imshow() actually plot the graph?
>
> Do I not need to do something like:
>
> contourf(X, Y, Z, levels)
>
> T
Hi Pete,
Thanks for the quick response.
Will imshow() actually plot the graph?
Do I not need to do something like:
contourf(X, Y, Z, levels)
Thanks
--
View this message in context:
http://www.nabble.com/Contour-Contourf-Plot-Heatmap---Grid---Multiple-Items-tp18872991p18874222.html
Sent from
Someone more knowlegeable than me may corrct me here, but the code for
getting your data into a grid could be greatly simplified to:
X = array([0,1,2,3,4,5,6,7,8,9,])
Y = array([0,1,2,3,4,5,6,7,8,9,])
Z = ListValues.reshape(10,10)
than you could use something like imshow() to show the data withou
Hi,
I have been using matplotlib for about 2 weeks now. I thought it would be
good to try plotting heatmaps to show some data.
The idea:
I have 100 values all ranging from 0.00 to 1.00, I would like to create a
graph with a 10 by 10 grid. Therefore each value has 1 section of the grid.
So, for
11 matches
Mail list logo