rescale

Correct way to standardize/scale/normalize multiple variables following power law distribution for use in linear combination

I'd like to combine a few metrics of nodes in a social network graph into a single value for rank ordering the nodes: in_degree + betweenness_centrality = informal_power_index The problem is that in_degree and betweenness_centrality are measured on different scales, say 0-15 vs 0-35000 and follow a power law distribution (at least...

Scaling a 2D polygon with the mouse

Hi, I develop a Python-based drawing program, Whyteboard (https://launchpad.net/whyteboard) I'm developing features to allow the user to rotate and scale a polygon that they draw. Here's my problem: I have a Polygon class containing a list of all points, which is "closed off" at the end. Users can select drawn shapes in my program, wh...

Auto inferring scale for a time series plot.

Problem: I am plotting a time series. I don't know apriori the minimum & maximum values. I want to plot it for the last 5 seconds of data. I want the plot to automaticaly rescale itself to best fit the data for the past five seconds. However, I don't want the rescaling to be jerky (as one would get by constantly resetting the min & max)...

Cocoa : Scale Image dragged into an ImageWell

I am working on application to keep a comic book collection in order. The user should be able to drag an image of the cover artwork into the program via an ImageWell. Since it is not possible to drag the image out of the application again I don't need to save the picture in it's original size. An image at the size of the ImageWell would...

.net Drawing.Graphics.FromImage() returns blank black image

I'm trying to rescale uploaded jpeg in asp.net So I go: Image original = Image.FromStream(myPostedFile.InputStream); int w=original.Width, h=original.Height; using(Graphics g = Graphics.FromImage(original)) { g.ScaleTransform(0.5f, 0.5f); ... // e.g. using (Bitmap done = new Bitmap(w, h, g)) { done.Save( Server.MapPath(saveas), I...