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
1
vote
1 answer

Android imported Bitmaps too large on Canvas

I'm developing a game. My Canvas should scale to screen height (1920x1080 on the emulator phone). But when I import images from Photoshop (1920x1080), they are way larger than the phone. Why does this happen? Is my Canvas secretly a smaller size…
1
vote
1 answer

How can I have two different linear scales in x-axis in python?

Is there a way that I can set two different scales at the x-axis in a python plot? I have following code: import numpy as np from matplotlib import pyplot as plt import pandas as pd data=pd.read_csv(file, names=['Wavenumber',…
columbo
  • 13
  • 2
1
vote
0 answers

How to change the rotation and scale of a text container by dragging in Flutter?

I'm creating a Flutter app in which you can add text on images. How can I change the rotation and scale of the text container by dragging their corresponding buttons? here is the text container's image and here is the text container's code: Stack( …
1
vote
1 answer

Matlab: Scale data, to plot multiple vectors on a single graph

I want to plot the following, on one single scaled graph. Here is my data and single plots of this data: A = [11 115 167 44 51 5 6]; B = [100 1 1 87]; C = [2000 625]; D = [81 623 45 48 6 14 429 456 94]; E = [89]; F = [44 846 998 2035 498 4 68 4 1…
Div
  • 121
  • 8
1
vote
0 answers

Bitmap does not scale accurately when screen size changes

I have a created a scaled bitmap scaledfish[0] for my bitmap fish[0], so that when the screen size is changed my program will automatically scale the bitmap to the new screen size. My code follows: fish[0] =…
user111
  • 11
  • 2
1
vote
1 answer

How to display geom_text as millions in ggplot2

Typically to display axis values in different scales in ggplot2 we can use the following: p + scale_y_continuous(labels = scales::unit_format(unit = "M", scale = 1e-6)) How can the same be done for geom_text labels? With commas we would do the…
Cyrus Mohammadian
  • 4,982
  • 6
  • 33
  • 62
1
vote
1 answer

how do you scale a system from 1 request/sec to thousands of requests/sec

General System design question: There is an application that queries DB with lat,long for address and makes an API call to format the address. Currently these requests are processed at a speed of 1 request per second, how do you scale up our…
dreambigcoder
  • 1,859
  • 4
  • 22
  • 32
1
vote
0 answers

How to scale path and photo together in android

I'm working for draw on photo android app. I'm trying to add zoom photo and drawn path together. override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { super.onSizeChanged(w, h, oldw, oldh) initialize() …
Alexander
  • 1,720
  • 4
  • 22
  • 40
1
vote
3 answers

SwiftUI: ZStack with scaleEffect - how to align scaled image to bottom?

I have a ZStack in which an Image is presented. The image needs to be scaled in some cases. I am failing on aligning the scaled image on the bottom of the ZStack, it is always presented in the middle. I tried ZStack(alignment: .bottom) in…
1
vote
1 answer

Number of clients at Server and Client Varies Java NIO

I am learning how the system scales millions of connections to a single box. With the early set of learnings TCP 3-way handshake, NIO's way of accepting connections. I ran multiple tests (simple client-server code) and kept following counters - At…
Bishnu
  • 383
  • 4
  • 14
1
vote
1 answer

Inverse of log2 transform through ggplot + coord_trans

I would like to do inverse of log2 transform on my coordinates only. From what I understand, exp_trans() and log_trans() go together, so gg.plot + coord_trans(x="exp") would perform inverse of log on the coordinates. However, I noticed there is…
aiorr
  • 547
  • 4
  • 11
1
vote
1 answer

zoomToRect: Transform rectangle in a portrait image to the same image scaled to fit in landsape

i have the following problem. i have UIImageView which displays an image in fullscreen in portrait mode 768 x 1024. At position 200,200 i have a CGRect displayes with width 100,100 ... CGRect(200,200,100,100) Everything fine until here. Now if i…
Nando Lambrusco
  • 127
  • 2
  • 11
1
vote
2 answers

How to make an image grow in size with pygame

In a game that I'm making, I have an image that I need to scale from (old_width, old_height) to (new_width, new_height), so that it seems it's growing bigger, and I need to do that multiple times during the game. So far, I've tried with…
Kyle
  • 113
  • 3
  • 13
1
vote
2 answers

flip an element inside SVG horizontally but keeps it's original position

I want to flip SVG elements (path, line, polyline, text ...) without changing the original position. For example
Ilyas Ghomrani
  • 408
  • 6
  • 26
1
vote
1 answer

Scale & replace in Dataframe

I need to scale some columns out of my dataframe and I found a function which did it perfectly. So my question is how to replace the scaled columns in my dataframe? Is there a specific function for that or am I supposed to do it in a different…
user12279401