Questions tagged [rescale]
155 questions
1
vote
1 answer
Normalize data in R data.frame column
Suppose I have the following data:
a <- data.frame(var1=letters,var2=runif(26))
Suppose I want to scale every value in var2 such that the sum of the var2 column is equal to 1 (basically turn the var2 column into a probability distribution)
I have…

Imlerith
- 479
- 1
- 7
- 15
1
vote
3 answers
R Function normalize data frame variable
I have a dataset with continuous variables and two categorical ID variables. I would like to scale my data such that the continuous variables have the value of one for a a certain value of each ID. I try to implement it as a function in R so that I…

S.K.
- 365
- 1
- 3
- 17
1
vote
1 answer
Irregular interval in Matlab Colormap
I am plotting values using the "patch" function in Matlab, where data stored in a vector define the color of the patches.
My data range from 0 to 5, but most of the data are bunched around 0.5 and 4.5. If I set the limits of the colormap [0-1] I…

Maxim L
- 209
- 6
- 15
1
vote
1 answer
Change starting point, scale in ggvis for R
I am trying to create a line graph but I want to change the y-axis scale that it goes from 0 - 0.5 and another one where it goes from 0 - 1. Whenever I use the "values" argument it is not getting me the graph I wanted. This is my current…

Ravi
- 11
- 4
1
vote
0 answers
Rescale Python Array with user-defined min and max
I have a function that rescales an array to values between 0.0 and 1.0, but I am stuck as to how to rescale the returned array to a user-defined new min/max range. The questions prompt is "Rewrite the rescale function so that it scales data to lie…

LOBthon
- 11
- 2
1
vote
3 answers
HTML image resize downscale bad quality
I have a development made.
I'm using 430px X 455px images
When I down-scaled image to 184px width:
- Google Chrome: looks perfect
- Firefox (37.0.1) looks very unfocused
- Internet Explorer (11.0.9): "sawtooth" look (very pixelated)
Why is this? Not…

Javier
- 395
- 3
- 18
1
vote
2 answers
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…

TalkingCode
- 13,407
- 27
- 102
- 147
1
vote
2 answers
JavaFX : What is the proper method for scaling controls on a scene/stage/window?
I've got a simple control that is nothing but a label and a VBox. The purpose is to inform the user of things in the program. I want to make it so that the label will scale with the scene properly. I have the methods in place to accomplish this task…

Will
- 3,413
- 7
- 50
- 107
1
vote
2 answers
Scaling heat map colours for multiple heat maps
So I have a bunch of matrices that I am trying to plot as a heatmaps. I am using the heatmap.2() function in the ggplot2 packaage.
I have been trying for quite some time with it, and I am sure there is a very simple fix, but my issue is this:
How do…

FitzKaos
- 381
- 3
- 20
1
vote
0 answers
Normalization or Standardization? When to use what?
I've calculated the cosine similarity between two vectors. For instance, each vector can have x elements, V = {v[0], v[1], ...}, such as {age, height, ...}
Currently, I do not normalize on each element. In other words, elements that have higher…

user3334418
- 71
- 6
1
vote
0 answers
Update xlim based on current ylim?
I have a plot in matplotlib and I would like to resize automatically the xlim based on the view fixed by ylim. How to do that ?
Currently I write :
plt.ylim(0, 10)
And the problem occurs when I have a set of data that goes from y=0 to y=20, then…

Vincent
- 57,703
- 61
- 205
- 388
1
vote
2 answers
matlab: change axes from px to um
simple question...
I have a matrix, lets say A = magic(512). I display it as imagesc(A). Now, I know, that 1px is equal to lets say x=15 [um]. How to display axis values in um instead of px?
Thanks

Art
- 1,196
- 5
- 18
- 34
1
vote
1 answer
Why does resize make my image look strange?
I have a relative layout on which i add a view. this is the code in the activity:
paint = (RelativeLayout) findViewById(R.id.paint);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
myView =…

rosu alin
- 5,674
- 11
- 69
- 150
1
vote
0 answers
Android blank bitmap
I'm creating bitmaps using inSampleSize. I've come across an unusual problem. On some images the rescaled image is blank.
Example 1:
Original: 4288x2848
inSampleSize = 2;
Rescale: 2144x1424
Result is a blank image
Original: 4288x2848
inSampleSize…

Anthony
- 7,638
- 3
- 38
- 71
0
votes
1 answer
Point Re-Plot on Image Rescaling
I want to be able to plot a point on a rescaled image back to the original image and still point at the same location on the image.
Say I have an image with an original size of 1024x768. I rescale it to fit into a viewable zone of 640x480 and plot…

Armando Ortiz
- 81
- 1
- 1