smoothing

Less smoothed line in ggplot2, alternatives to geom_smooth?

断了今生、忘了曾经 提交于 2019-12-08 19:16:47
问题 Using the following data: > str(attribute) 'data.frame': 431 obs. of 2 variables: $ pos: int 1 2 3 4 5 6 7 8 9 10 ... $ att: num 0.652 0.733 0.815 1.079 0.885 ... *[between 0 and 3] and: ggplot(attribute, aes(x=pos, y=att)) + geom_line() + geom_smooth() I did: I would like to progressively smooth the black curve, not "as much as" geom_smooth default did. I've tried n , level options, but didn't do what I want. Which would be the best way to increase smoothing progressively? (e.g. average 2

How to draw loess estimation in GGally using ggpairs?

自作多情 提交于 2019-12-08 08:13:04
问题 I tried GGally package a little bit. Especially the ggpairs function. However, I cannot figure out how to use loess instead of lm when plot smooth. Any ideas? Here is my code: require(GGally) diamonds.samp <- diamonds[sample(1:dim(diamonds)[1],200),] ggpairs(diamonds.samp[,c(1,5)], lower = list(continuous = "smooth"), params = c(method = "loess"), axisLabels = "show") Thanks! P.S. compare with the plotmatrix function, ggpairs is much much slower... As a result, most of the time, I just use

How to make text/labels smooth?

只愿长相守 提交于 2019-12-07 04:44:28
问题 Does anyone know how to make labels, or text, smoother? At the moment they look quite jagged. As I want to make the label dynamic, I can't just insert the text from Photoshop. 回答1: You'll have to dynamically generate images representing your text if you want to anti-alias it. Here is an example on msdn: http://msdn.microsoft.com/en-us/library/a619zh6z.aspx EDIT: Editing per comment below. The link describes using the OnPaint event of your control to use a different TextRenderingHint. If you

How to get confidence interval for smooth.spline?

孤者浪人 提交于 2019-12-06 08:44:35
问题 I have used smooth.spline to estimate a cubic spline for my data. But when I calculate the 90% point-wise confidence interval using equation, the results seems to be a little bit off. Can someone please tell me if I did it wrongly? I am just wondering if there is a function that can automatically calculate a point-wise interval band associated with smooth.spline function. boneMaleSmooth = smooth.spline( bone[males,"age"], bone[males,"spnbmd"], cv=FALSE) error90_male = qnorm(.95)*sd

Weighted smoothing of a 1D array - Python

隐身守侯 提交于 2019-12-06 08:10:44
I am quite new to Python and I have an array of some parameter detections, some of the values were detected incorrectly and (like 4555555): array = [1, 20, 55, 33, 4555555, 1] And I want to somehow smooth it. Right now I'm doing that with a weighted mean: def smoothify(array): for i in range(1, len(array) - 2): array[i] = 0.7 * array[i] + 0.15 * (array[i - 1] + array[i + 1]) return array But it works pretty bad, of course, we can take a weighted mean of more than 3 elements, but it results in copypasting... I tried to find some native functions for that, but I failed. Could you please help me

smooth scroll with mousewheel to next or previous div

自作多情 提交于 2019-12-06 06:04:38
问题 I'm trying to get a javascript on my site so when a person scrolls on the website, it automatically scrolls to the next or previous Div with a certain class. I'm working with smoothscroll and scrollto. I also found two codes that I'm trying to combine. But I don't seem to understand the whole scripts... The first script is from http://webdesignerwall.com/tutorials/scrollto-posts-with-jquery. This script makes it possible to navigate between DIV's (with a certain class) by pressing next or

Smoothing motion parameters

安稳与你 提交于 2019-12-06 05:29:22
I have been working on video stabilization for quite a few weeks now. The algorithm I'm following basically involves 3 steps :- 1. FAST feature detection and Matching 2. Calculating affine transformation (scale + rotation + translation x + translation y ) from matched keypoints 3. Smooth motion parameters using cubic spline or b-spline. I have been able to calculate affine transform. But I am stuck at smoothing motion parameters. I have been unable to evaluate spline function to smooth the three parameters. Here is a graph for smoothed data points Any suggestion or help as to how can I code to

LibGDX - How to smooth out actor drawable when scaling a Scene2d stage?

最后都变了- 提交于 2019-12-05 22:57:34
问题 This is my set-up: stage = new Stage(1280, 800, false); button = new Button(drawableUp, drawableDown); stage.add(button); this gets rendered as following: @Override public void render(float delta) { Gdx.gl.glClearColor(RED,GREEN,BLUE,ALPHA); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); stage.act(delta); stage.draw(); } The issue is that when the stage is shown on 1280x800 the button looks like that: If the stage is rescaled to e.g. 1280x736, the button drawable is scaled in the following way: Is

Smooth MultiPlayer movement

我的梦境 提交于 2019-12-05 09:23:34
i am developing a multiplayer roleplaying game, (No, its not a mmorpg. ;) My current setup is like this. Client tells the server "I want to move forward"/"I want to move backwards", the server then updates your entity, and informs all clients in the area about the change. The server is also updating each entity every 20ms and sending updates every 100ms to the clients, these updates contains position, velocity, rotation etc. So far so good, however i have nothing in store for smoothing the movement between the packets on the client side, and i must say, i can not get it working. I have been

Scatter plot kernel smoothing: ksmooth() does not smooth my data at all

风流意气都作罢 提交于 2019-12-05 05:59:37
Original question I want to smooth my explanatory variable, something like Speed data of a vehicle, and then use this smoothed values. I searched a lot, and find nothing that directly is my answer. I know how to calculate the kernel density estimation ( density() or KernSmooth::bkde() ) but I don't know then how to calculate the smoothed values of speed. Re-edited question Thanks to @ZheyuanLi, I am able to better explain what I have and what I want to do. So I have re-edited my question as below. I have some speed measurement of a vehicle during a time, stored as a data frame vehicle : t