contourf

Create a contour plot from 3 vectors

别说谁变了你拦得住时间么 提交于 2019-12-06 02:26:07
I'm trying to create a contour plot from this data: pH D Tur 5.10 3 79.18918919 5.50 6 92.97297297 5.00 0 50.09009009 5.00 6 90.36036036 5.10 9 91.08108108 5.10 12 89.18918919 5.10 15 83.6036036 5.00 18 91.26126126 5.00 21 81.26126126 5.00 24 90.99099099 5.00 27 91.44144144 5.00 30 90.45045045 6.00 0 43.42342342 5.64 3 81.8018018 5.50 9 92.16216216 5.50 0 44.68468468 5.40 12 92.34234234 5.50 15 92.25225225 5.50 18 91.62162162 5.50 21 90.81081081 5.50 24 91.8018018 5.50 27 92.52252252 5.50 30 90.36036036 6.10 3 81.98198198 6.00 6 93.51351351 6.00 9 94.77477477 6.10 12 95.04504505 6.00 15 94

Removing the edge line on a contour plot

杀马特。学长 韩版系。学妹 提交于 2019-12-05 02:49:11
问题 I used Matlab to create a polar coordinate and converted it into Cartesian coordinate. [th,r] = meshgrid((0:0.5:360)*pi/180,0:.02:1); [X,Y] = pol2cart(th,r); I get data on this mesh and produce a contourf plot over it. My problem is that I get a center line in my contourf plot which I would like to remove, could some help me with this Thank you 回答1: If I extend a little bit your example to get something I can plot, I do reproduce the problem: [th,r] = meshgrid((0:0.5:360)*pi/180,0:.02:1); [X

Matlab and XTickLabel

前提是你 提交于 2019-12-04 06:49:34
问题 I've been trying to get Matlab to change the labelling on my contourf plots for about an hour now. When I go to change XTickLabel or XTick, it simply removes my x-axis altogether! The frustrating and infuriating thing is that I'm doing exactly what all the help pages and help forums are asking me to do - I honestly don't understand why this is not working. Hence, I am here. My plotting code (knowledge of the function shouldn't be required - the code is rather intense. It is, however, a 2D

Removing the edge line on a contour plot

痞子三分冷 提交于 2019-12-03 20:13:52
I used Matlab to create a polar coordinate and converted it into Cartesian coordinate. [th,r] = meshgrid((0:0.5:360)*pi/180,0:.02:1); [X,Y] = pol2cart(th,r); I get data on this mesh and produce a contourf plot over it. My problem is that I get a center line in my contourf plot which I would like to remove, could some help me with this Thank you If I extend a little bit your example to get something I can plot, I do reproduce the problem: [th,r] = meshgrid((0:0.5:360)*pi/180,0:.02:1); [X,Y] = pol2cart(th,r); Z = sqrt( X.^2 + Y.^2 ) ; isoLevel = 0:0.1:10 ; [C ,hc] = contourf(X,Y,Z,isoLevel) ;

How can I make an animation with contourf()?

匆匆过客 提交于 2019-11-30 07:01:36
I'm trying to animate the wigner function of the spatial coordinates of some time-dependent data. The wigner function is 2 dimensional, so I'm using contourf() to plot it. I have the data stored in a HDF5 file and can make Wigner distributions on the fly, but I can't figure out how to animate it. All of the animation tutorials and examples I've been able to find (for example this one and this one ) are strictly for line plots. Specifically, their animate(i) function uses line.set_data() , and I can't seem to find an equivalent for contourf() . How can I animate images made with contourf() ?

How can I make an animation with contourf()?

别说谁变了你拦得住时间么 提交于 2019-11-29 02:49:45
问题 I'm trying to animate the wigner function of the spatial coordinates of some time-dependent data. The wigner function is 2 dimensional, so I'm using contourf() to plot it. I have the data stored in a HDF5 file and can make Wigner distributions on the fly, but I can't figure out how to animate it. All of the animation tutorials and examples I've been able to find (for example this one and this one) are strictly for line plots. Specifically, their animate(i) function uses line.set_data() , and

Python matplotlib colorbar scientific notation base

廉价感情. 提交于 2019-11-27 03:24:05
问题 I am trying to customise a colorbar on my matpllotlib contourf plots. Whilst I am able to use scientific notation I am trying to change the base of the notation - essentially so that my ticks would be in the range of (-100,100) rather than (-10,10). For example, this produces a simple plot... import numpy as np import matplotlib.pyplot as plt z = (np.random.random((10,10)) - 0.5) * 0.2 fig, ax = plt.subplots() plot = ax.contourf(z) cbar = fig.colorbar(plot) cbar.formatter.set_powerlimits((0,