Questions tagged [scale]

The scale tag is mostly used for questions that relate to proportional resizing of images or UI elements. It is also used for questions related to function scale() in R language.

In scientific software for statistical computing and graphics, the function scale performs standardization of a vector or a matrix (by column).

4504 questions
25
votes
4 answers

CSS: How to scale an image from the center instead of top-left

So my problem is that I have an image and I set its CSS to have a max-width: 100% which scales it at lower resolutions ( as will be seen in the fiddle below ). What I want is for the transition to take effect from the center of the…
Eolis
  • 645
  • 2
  • 9
  • 22
25
votes
1 answer

CSS: Wrong position of "transform: scale();" container children

I have a container element with long content which is scaled: .container { transform: scale(0.9); } inside this container I have a child div which is used to be a popup. It's positioned absolute with top 50% .popup { width: 300px; height:…
Kosmetika
  • 20,774
  • 37
  • 108
  • 172
24
votes
2 answers

Scikit-learn: preprocessing.scale() vs preprocessing.StandardScalar()

I understand that scaling means centering the mean(mean=0) and making unit variance(variance=1). But, What is the difference between preprocessing.scale(x)and preprocessing.StandardScalar() in scikit-learn?
learncode
  • 1,105
  • 4
  • 18
  • 36
24
votes
3 answers

CSS scale several images to fit viewport keeping aspect ratio

I'm creating a gallery where I want to list all images from an album on one page : Big Picture style : Unlike Big Picture, I want the images to proportionally scale to fit to the width of the container div (.section-images, which is set to margin:…
MindOverflow
  • 265
  • 1
  • 2
  • 6
24
votes
8 answers

Stretch Image to Fit

The src should stretch its width to match_parent, while keeping aspect ratio. When the image is larger than the parent, it scales down correctly. But when the image is smaller, it does not scale up. (illustration shows desired…
Matt
  • 5,461
  • 7
  • 36
  • 43
24
votes
2 answers

Is CodeIgniter a wise choice for large applications?

I keep on reading how great codeigniter is from a development standpoint. And I am sure that using the framework will make the development process quicker. But the question I ask myself is, will there be a difference to a individually made…
Joseph
  • 9,171
  • 8
  • 41
  • 67
23
votes
2 answers

How to insert scale bar in a map in matplotlib

Any ideas on how can I insert a scale bar in a map in matplotlib that shows the length scale? something like the one I have attached. Or maybe any ideas on measuring and showing distances automatically (not drawing an arrow and writing the distance…
Behnam
  • 501
  • 1
  • 5
  • 21
23
votes
1 answer

HTML5 canvas how to change putImageData scale

How to change putImageData scale with scale(1.5, 1.5) not working.. var imageData = context.getImageData(0, 0, canvas.width, canvas.height); context.clearRect(0, 0, canvas.width, canvas.height); context.scale(1.5,…
user3778390
  • 375
  • 1
  • 6
  • 16
22
votes
3 answers

When using CSS Scale in Firefox, element keeps original position

When using scale in Firefox, the scaled element dóes get scaled properly. The problem is, that it's positioned as if it isn't scaled. This works fine in Chrome, and probably also in IE, Safari and Opera. These browsers all support the CSS zoom…
Thomas
  • 20,731
  • 6
  • 22
  • 23
22
votes
6 answers

How to know the current scale of a UIView?

How do you find the current scale (zoom level) of a UIView?
Jonathan
  • 873
  • 3
  • 9
  • 23
22
votes
1 answer

asymmetric color distribution in scale_gradient2?

Changing the upper limits for scale_fill_gradient2 also effects the colorscaling for values < 0 as the color distribution around 0 seems to be always symmetrically, is there a way to get a asymmetric distribution of color values? Here a minimal…
Dahaniel
  • 383
  • 3
  • 8
21
votes
8 answers

What does it mean to say that a framework "scales well"?

When reading about frameworks (.net. ruby on rails, django, spring, etc.), I keep seeing so and so does or doesn't scale well. What does it mean when someone says that a framework "scales well" and what does it mean to say a framework "doesn't scale…
johnny
  • 19,272
  • 52
  • 157
  • 259
21
votes
3 answers

Heroku: How can I dynamically scale dynos based on load time?

There are random times throughout the day that my app can have pretty extreme increases in load based on various factors. At those times, I'd like to automatically increase the number of dynos. I'd like to base the increase on the load time. So if…
Shpigford
  • 24,748
  • 58
  • 163
  • 252
21
votes
5 answers

HTML5 Video scale modes?

I'm trying to make a fullscreen HTML background, which is easy enough. But because HTML5 video get's resized to fit the container while maintaining aspect ratio, I can't gett he desired effect. Are there different scale modes for HTML5 video? I'd…
Drew Baker
  • 14,154
  • 15
  • 58
  • 97
21
votes
2 answers

Scale page to 1.0 using meta tags

I use this two functions to set and reset scale values when I instigate a JS app from an HTML page. function setMeta(){ alert("meta set"); oldcontent=$('meta[name=viewport]').attr('content') //store the current value …
Jacob
  • 3,580
  • 22
  • 82
  • 146