Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am programming artificial neural networks at the moment and would like to plot e.g. the weights of the net which are stored as numpy arrays.
I have no experiance with matplotlib and the vast amount of possibilites confused me a bit.
Preferably I would like to update the plot every second or so and plot the numpy arrays as colored squares (greyscale for 0 to 1 interval weights, colored for other intervals like -1 to 1).
In addition to that I would also like to plot some output data in graphs (normally x/y integers).
How can I achieve this? Which things from matplotlib do I need?
Can someone provide a (easy) tutorial?
Thanks a lot :)
You need something like matplotlib.animation module:
http://matplotlib.org/api/animation_api.html
http://matplotlib.org/examples/animation/
http://wiki.scipy.org/Cookbook/Matplotlib/Animations
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
The question is pretty simple but I'm unclear if the solution is. I have basketball player stats that I want to visualize over time and sometimes I want to visualize it across multiple seasons (years). They don't play year-round so there are generally about 6 months where there is simply no data.
If I don't care necessarily that the dates on the x-axis are scaled accurately, is there a good way to visualize these multiple seasons without a) having massive gaps in the graph and b) interpolating a physically long line filler?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I want to produce a flow field map in Python which should be perfectly readable for people with colorblindness. Just like the image on the following page (created with GMT):
My data is in netcdf format, the flow vectors are in u and v components and I am plotting it on a meshgrid(lon, lat) with plt.quiver.
The problem with quiver is that you just can control the colors ond not the style of arrows.
I have a workaround with windbarbs (plt.barbs), however it would be much better to include custom arrows for specific data values.
Is there a way in python to include different arrow styles?
Or is there a possibility to include arrow styles for specific data ranges?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
right now I'm looking for an sklearn method that does something like:
arr = [13,15,41,45,90,100]
print(KMeans.num_clusters(arr))
Outputs 3
You can use mean-shift clustering. It does not require number of clusters beforehand. However, the drawback of mean shift is that it is not very efficient compared to the k-means. Since your example array is only 1 dimensional it should not be a problem. If you are going to use mean-shift with 2 or more dimensional data, be careful with the curse of dimensionality.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm currently analyzing air quality data. I've got long arrays of 17 columns and around 100 rows/day that I'll be averaging. I'd like to plot some of that data, specifically Ozone concentrations, on a map.
Basically, my visualized final product is this:
So, where the air quality sensor is, I want to highlight a 1x1 km area around it in a specific color corresponding to the value of ozone concentration the sensor is reading (either over an average day or at a specific time).
Is there any python module that could help me achieve this product/plot my data onto a map well?
As "Basemap" is a rather popular package for creating maps in Python, I suggest having a look at this article: How to draw rectangles on a Basemap
Once you figure out how to draw rectangles that are scaled to your specifications, it should be easy to fill them with a color representing your data.
Cheers!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to visualize track on geographic map. I don't need thousands of layers, 3d and other GIS functionality. I just want to visualize my (latitude, longitude, altitude, time) tuples on map background as simple as possible. Animation should also be supported.
Could anyone recommend good Python library?
There's something called basemap which is an addon for matplotlib to do maps.
See the gallery or cookbook example.
Matplotlib has it's own animation support and I don't know any reason it shouldn't work with basemap (although as that page notes, it's not the fastest thing around).
There is a YouTube video series which covers basemap and matplotlib called 'Geographical Plotting with Python' posted by Sentdex.
Part 1 -
http://www.youtube.com/watch?v=E6gvtfQHJUs
Incidentally he has a number of other interesting Python projects on his channel:
http://www.youtube.com/user/sentdex