smooth

R: How to remove outliers from a smoother in ggplot2?

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the following data set that I am trying to plot with ggplot2, it is a time series of three experiments A1, B1 and C1 and each experiment had three replicates. I am trying to add a stat which detects and removes outliers before returning a smoother (mean and variance?). I have written my own outlier function (not shown) but I expect there is already a function to do this, I just have not found it. I've looked at stat_sum_df("median_hilow", geom = "smooth") from some examples in the ggplot2 book, but I didn't understand the help doc

How to smooth a freehand drawn SVG path?

岁酱吖の 提交于 2019-12-02 20:54:46
I am looking for a solution to convert a freehand, user drawn SVG path, consisting of lots auf LineTo segments, into a smoother one. Preferred language would be JavaScript, but any advice is welcome. first of all, I would recommend using a good graphics library, such as raphael. It will simplify the process of actually using javascript to perform the drawing. A very simple method of smoothing is to convert all lineto commands with equivalent curveto commands and calculate some control points based on the angles of each line segment. For example, <svg width="1000" height="1000" version="1.1"

Mediaplayer progress update to seekbar not smooth?

こ雲淡風輕ζ 提交于 2019-12-02 18:22:02
I am working on an app with recorder and player. I am using mediaplayer to play the recorded .wav file and meantime I want to update to a seekbar. Everything is working fine But my problem is mediaplayer progress updation to seekbar is not happening smoothly, If we are playig a small file, thumb of the seekbar jumps in seconds or between. Can anyone help me with a workaround to make it smooth seeking of the progress in seekbar. My code is shown below.I am totlay stuck here. mediaPlayerIntiate(); mediaPlayerSetSource(); mMediaPlayer.start(); task = new TimerTask() { @Override public void run()

How can I make my form resize more smoothly?

≡放荡痞女 提交于 2019-12-02 18:14:45
When resizing a form with many controls, the form looks bad because of flickering. What are some tips to have a smoother form resizing? A. Vrbic procedure TForm1.WMEnterSizeMove(var Message:TWMMove); begin Self.DisableAlign; end; procedure TForm1.WMExitSizeMove(var Message:TWMMove); begin Self.EnableAlign; end; Try using WM_SETREDRAW ( not LockWindowUpdate ). You might also have a look at DeferWindowPos . Complex forms are often made up of nested panels, and the repaint process may cause flickering. If this is the case with your project there are two easy solutions that might help: Disable the

web前端入门到实战:页面平滑滚动小技巧

无人久伴 提交于 2019-12-02 09:28:10
背景 今天写需求的时候发现一个小的优化点:用户选择了一些数据之后, 对应列表中的数据需要高亮, 有时候列表很长, 为了提升用户体验,需要加个滚动, 自动滚动到目标位置。简单的处理了一下, 问题顺利解决, 就把这个小技巧分享一下给大家。 正文 有几种不同的方式来解决这个小问题。 1.scrollTop 第一想到的还是scrollTop, 获取元素的位置, 然后直接设置: // 设置滚动的距离 element.scrollTop = value; 不过这样子有点生硬, 可以加个缓动: var scrollSmoothTo = function (position) { if (!window.requestAnimationFrame) { window.requestAnimationFrame = function(callback, element) { return setTimeout(callback, 17); }; } // 当前滚动高度 var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; // 滚动step方法 var step = function () { // 距离目标滚动距离 var distance = position - scrollTop; //

OpenCV how to smooth contour, reducing noise

不羁岁月 提交于 2019-12-02 04:00:35
问题 I extracted the contours of an image, that you can see here: However, it has some noise. How can I smooth the noise? I did a close up to make clearer what I want to meant Original image that I've used: Code: rMaskgray = cv2.imread('redmask.jpg', cv2.CV_LOAD_IMAGE_GRAYSCALE) (thresh, binRed) = cv2.threshold(rMaskgray, 50, 255, cv2.THRESH_BINARY) Rcontours, hier_r = cv2.findContours(binRed,cv2.RETR_CCOMP,cv2.CHAIN_APPROX_SIMPLE) r_areas = [cv2.contourArea(c) for c in Rcontours] max_rarea = np

Gnuplot x(y) smoothing

徘徊边缘 提交于 2019-12-02 03:11:12
问题 How do I smooth the data presented in the form x(y)? Gnuplot smoothing function of to invalid handles such cases. As an example: File(T-L.dat): 0.00 0.0 0.10 0.1 0.15 0.2 0.40 0.3 0.60 0.4 0.50 0.5 0.60 0.6 0.40 0.7 0.15 0.8 0.10 0.9 0.00 1.0 What I want. Gnuplot session: knkd@SCP71:~/MEAS/HEAT$ gnuplot G N U P L O T Version 4.6 patchlevel 4 last modified 2013-10-02 Build System: Linux x86_64 Copyright (C) 1986-1993, 1998, 2004, 2007-2013 Thomas Williams, Colin Kelley and many others gnuplot

Gnuplot x(y) smoothing

送分小仙女□ 提交于 2019-12-02 01:23:23
How do I smooth the data presented in the form x(y)? Gnuplot smoothing function of to invalid handles such cases. As an example: File(T-L.dat): 0.00 0.0 0.10 0.1 0.15 0.2 0.40 0.3 0.60 0.4 0.50 0.5 0.60 0.6 0.40 0.7 0.15 0.8 0.10 0.9 0.00 1.0 What I want . Gnuplot session: knkd@SCP71:~/MEAS/HEAT$ gnuplot G N U P L O T Version 4.6 patchlevel 4 last modified 2013-10-02 Build System: Linux x86_64 Copyright (C) 1986-1993, 1998, 2004, 2007-2013 Thomas Williams, Colin Kelley and many others gnuplot home: http://www.gnuplot.info faq, bugs, etc: type "help FAQ" immediate help: type "help" (plot window

Smooth resizing in a borderless form/window in Delphi

与世无争的帅哥 提交于 2019-12-01 17:55:51
I am trying to resize a borderless form but when I increase the size using the right/bottom side, I get a gap between the border and the old client area that depends of the speed you move the mouse. The effect is more noticeable when you resize from the left border or even from the bottomleft corner, it's horrible everywhere (I tried with other commercial apps and it happens as well). This effect happens as well when I change to sizable border, but it's not as awful as when I remove form borders The form layout consists in a top panel doing the title bar function (with some tImages and buttons

ggplot2: geom_smooth select observations connections (equivalence to geom_path())

落爺英雄遲暮 提交于 2019-12-01 08:14:06
I am using ggplot2 to create vertical profiles of the ocean. My raw data set creates "spikes" so to make smooth curves. I am hoping to use geom_smooth() . I also want the line to progress according to the order of the observations (and not according to the x axis). When I use geom_path() , it works for the original plot, but not for the resulting geom_smooth() (see picture below). melteddf = Storfjorden %>% melt(id.vars = "Depth") ggplot(melteddf, aes(y = Depth, x = value)) + facet_wrap(~ variable, nrow = 1, scales = "free_x") + scale_y_reverse() + geom_smooth(span = 0.5,se = FALSE) + geom