contour

Plot Zero Value on Contour Plot in MATLAB

删除回忆录丶 提交于 2019-12-11 08:38:38
问题 I'm plotting z values, 0 to 10, on a contour plot. When I include data 1 or greater, I obtain a contour plot. Like the following: longitude = [80 82 95] latitude = [30 32 35] temp = [1 4 6; 1 2 7; 3 5 7] contourf(longitude,latitude,temp) Now, I want to plot the ZERO VALUE also on the contour plot. While I was expecting one color representing the zero value, instead I obtained a white square. longitude = [80 82 95] latitude = [30 32 35] temp = [0 0 0; 0 0 0; 0 0 0] contourf(longitude,latitude

dimensions of kde object from ks package, R

一世执手 提交于 2019-12-11 08:31:10
问题 I am using the ks package from R to estimate 2d space utilization using distance and depth information. What I would like to do is to use the 95% contour output to get the maximum vertical and horizontal distance. So essentially, I want to be able to get the dimensions or measurements of the resulting 95% contour. Here is a piece of code with as an example, require(ks) dist<-c(1650,1300,3713,3718) depth<-c(22,19.5,20.5,8.60) dd<-data.frame(cbind(dist,depth)) ## auto bandwidth selection H.pi2<

I can't find a way to fit contour on new image zero point

点点圈 提交于 2019-12-11 07:49:36
问题 I have a binary image and I want to find contours, to fit the biggest one into a new image with the size of the contour as if a rectangle was around it. In other words, to fit the contour into a new image with lower size. The find contours routine is finding a rectangle for the whole image, and I don't need it. I look a contour of dimension (width - 1, height - 1) and skip it. I want to remove biggest rectangle and then fit the 2nd biggest rectangle into a new image. That biggest rectangle

Symmetrical Log color scale in matplotlib contourf plot

妖精的绣舞 提交于 2019-12-11 07:41:55
问题 How do I create a contour plot with a symlog (symmetrical log) scale for the contours. i.e. a log scale that shows both negative and positive values. One possibility would be to work off of this example: http://matplotlib.org/examples/pylab_examples/contourf_log.html Which gives this recipe for a log scale: from matplotlib import pyplot, ticker cs = pyplot.contourf(X, Y, z, locator=ticker.LogLocator()) However, this doesn't allow for negative values. There is a ticker.SymmetricalLogLocator()

2D (kde2d) contour plots with conditions

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 07:39:48
问题 I have 4 variables x1,x2 y1,y2 (365 values for each variable). I want to plot the 2d kernel density with specific contour levels. I need to overlay the density plots (x1 vs y1) and (x2 vs y2). x1 <- c(772.522, 1806.75, 2388.73, 2619.04, 2695.6, 2747.14, 2772.58, 2773.86, 2812.93, 3338.98, 3299.18, 3269.85, 3179.74, 3185.36, 3274.99, 3391.08, 3541.91, 3563.56, 3551.63, 3626.92, 3602.07, 3535.31, 3482.09, 3567.54, 3502.1, 3440.78, 3437.95, 3722.05, 3702.45, 3636.89, 3565.1, 3485.51, 3398.42,

how to make colors change smoothly when plotting in R

旧街凉风 提交于 2019-12-11 07:28:31
问题 ENV R 3.3.1 mini data rdn<-c(0.8,1.8,2.8) tdn<-c(1,2,3,4,5,6,7,8,9) idn<-matrix(c(0.3, 0.3, 0.3, 0.2, 0.2, 0.4, 0.1, 0.1, 0.5, 0, 0.2, 0.5, 0, 0.3, 0.6, 0, 0.4, 0.6, 0, 0.4, 0.6, 0, 0.5, 0.7, 0, 0.5, 0.7), nrow=9, ncol=3, byrow=T) What I have now : code filled.contour(tdn, rdn, idn, color.palette=colorRampPalette(c("blue","yellow","red")), plot.title=title(main="Detail", sub="detail", xlab="t", ylab="lambda"), plot.axes = { axis(side = 1, at = tdn, labels = tdn) axis(side = 2, at = rdn,

use of contour and contourf

♀尐吖头ヾ 提交于 2019-12-11 06:19:35
问题 I have a list of points: pointList = [ [x1,y1,z1], [x2,y2,z2], ... [xn,yn,zn]] and I want to draw a contour plot of this set of points. I try: import matplotlib.pyplot as plt pointList = [ [x1,y1,z1], [x2,y2,z2], ... [xn,yn,zn]] x = [el[0] for el in pointList] y = [el[1] for el in pointList] z = [el[2] for el in pointList] plt.contourf(x,y,z) plt.show() but I have this exception: TypeError: Input z must be a 2D array. This is strange because in the documentation of matplotlib I find: Call

Interpolating Between Two Planes in 3d space

三世轮回 提交于 2019-12-11 06:16:10
问题 I'm developing a tool that lets you circle/enclose things on a 3d "volume." I want to save time by labelling "slices" 1 and 3, and "filling in" slice 2 from that information. Two easy solutions are to: 1. slice2 = slice1 AND slice3 (gets the overlap between the two) 2. slice2 = slice2 OR slice3 (true for any pixel true in either image) These are ok and fast, but I would prefer to do something more intelligent by making the shape some sort of average/ interpolation between the two. You can

Walk along PShape contours and divide them?

混江龙づ霸主 提交于 2019-12-11 06:14:04
问题 I’m looking for a proper way of finding points along a PShape contour. My goal is to generate the same number of points along the two distances from a given point to another (right distance and left distance), then mark a point in the exact center between the the two points that are the same step number on each side. (I’m not sure if I’m being easily understandable, and I cannot attach img already, so I attach processing code). I imagine that the first step for getting it done is to calculate

generating contour plots for X,Y data in python

眉间皱痕 提交于 2019-12-11 05:59:58
问题 Hi im not sure if this has already been asked before but i couldn't find an answer to satisfy me. if you had X,Y and Temperature data see below for an example. how would you plot the temperature contour of the data in python X Y Temp 0 0 23 0.1 0 23 0.2 0 23 0.3 0 23 0.4 0 23 0.5 0 23 0.6 0 23 0.7 0 23 0.8 0 23 0.9 0 23 1 0 23 0 0.1 23 0.1 0.1 23 0.2 0.1 23 0.3 0.1 23 0.4 0.1 23 0.5 0.1 23 0.6 0.1 23 0.7 0.1 23 0.8 0.1 23 0.9 0.1 23 1 0.1 23 0 0.2 24 0.1 0.2 24 0.2 0.2 24 0.3 0.2 24 0.4 0.2