问题标签 [rescale]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
290 浏览

python - 根据当前的 ylim 更新 xlim?

我在 matplotlib 中有一个绘图,我想xlim根据ylim. 怎么做 ?

目前我写:

当我有一组从y=0到的数据时会出现问题y=20,然后xlim保持不变:我想让它自动重新缩放以对应于plt.ylim(0, 10).

0 投票
1 回答
1198 浏览

r - Obtaining unstandardized factor scores from factor analysis

I'm conducting a factor analysis of several variables in R using factanal(). I want to determine each case's factor score, but I want the factor scores to be unstandardized and on the original metric of the input variables. When I run the factor analysis and obtain the factor scores, they appear to be standardized and not on the original metric of the input variables. How can I obtain unstandardized factor scores that have the same metric as the input variables? Ideally, this would mean a similar mean, sd, and range. If this is not possible, how would I rescale the standardized factor scores to have this metric?

Here's a small example:

0 投票
3 回答
88 浏览

java - 如何重新缩放 JPanel 的绘制内容

我有一个窗口,其中包含JPanel绘制数字的上部和列表JPanel中列出的数字的下部,JList如下所示:

微缩模型JPanel的大小10x10。我希望它在上面板中包含绘制图形的缩影。我的意思是。

0 投票
2 回答
7463 浏览

javascript - 使图像在 javascript 中正确显示

我需要从其自然大小调整图像大小以适应屏幕,就像 Chrome 处理其中打开的图像一样,我为此编写了一个rescale() 函数(如下)。

它工作得很好,但对于大的横向图像(例如,在使用我的函数http://imageontime.com/upload/big/2013/07/20/51ea60b522bba.jpg调整大小后宽度和高度都超过屏幕的例子)全屏图像仍然在高度上超出屏幕几行(很少在宽度上),所以我想问一下是否有更好的重新缩放 javascript 函数,或者这里是否有任何铬源专家可以查看铬源代码以调整图像大小函数,所以我可以将它移植到javascript中?

这是代码:

0 投票
2 回答
461 浏览

dicom - What is the meaning of RescaleType = 'LOG_E REL' in a DICOM file?

I am trying to figure out the meaning of RescaleType = 'LOG_E REL' in a DICOM file. To be more specific, I need to know how to process the raw pixel values to get the image displayed in a proper way. Up to now I have only seen files with RescaleType = 'P-VALUES', which seemed to be correctly processed when applying formula:

pixVal = rescaleIntercept + rescaleSlope * pixRaw.

What would be the rescaling formula to apply when RescaleType = 'LOG_E REL'?

0 投票
1 回答
148 浏览

android - 在屏幕上移动视图

我有一个在屏幕上移动的图像视图。所以,我已经设置了 LayoutParams 来做到这一点。但是,android 坚持要调整我的 imageview 的大小。如何防止这种行为?

0 投票
2 回答
4779 浏览

javascript - 使用浏览器调整大小来缩放 KineticJS 舞台?

最近发现了 KineticJS,因为我一直在尝试将我的 Flash 技能转换为 HTML Canvas。这是一个非常令人印象深刻的工具!问题:如果我正在使用像 Bootstrap 这样的前端,并且我有一个包含几个 div 的页面,其中包含 KineticJS 生成的画布,我可以让这些画布与页面上的其他所有内容一起缩放吗?非常感谢。

----- 由于评论字数限制,我在OP回复。---------

你会设置它,以便有一个最大尺寸,然后让它像浏览器缩放时一样缩放?例如,在 Actionscript 中,我这样做是为了跟踪浏览器的大小并缩放舞台:

为了跨越复杂边界进入 HTML5 领域的 Flash 难民(如我)的利益,您能否提供一个示例或 2 个示例?

0 投票
2 回答
346 浏览

matlab - 使 MATLAB 面板自动重新缩放。(不使用指南)

我创建了一个基本的 MATLAB UI(不使用 GUIDE)。我基本上有一堆用于各种事物的面板(滑块、轴、文本框等)。

不过,我想做的一件事是,当我调整图形大小时,它们可以正确缩放。现在,我煞费苦心地为每个按钮、面板、子面板等制作了重新缩放功能,以使其正确重新缩放。

有没有一种简单的方法可以在这里简单地自动重新缩放?

谢谢。

0 投票
1 回答
21 浏览

java - 重新缩放动画

我有一些代码应该为我的程序的某些部分设置动画,现在,动画尺寸是硬编码的,即每个距离和位置都由一个数字指定。我只是想知道,有没有办法重新调整动画面板,以便硬编码的东西可以在屏幕较小的计算机上工作?

0 投票
1 回答
160 浏览

image - GWT - 获取图像的当前大小

我使用带有 ClickHandler 的 GWT 图像类来在单击图像的特定区域时触发操作。为了指定这些区域,我使用图像的尺寸。当您更改浏览器窗口的大小时会出现此问题。虽然图像很好地重新缩放,但 getWidth() 和 getHeight() 方法仍然返回图像的原始大小,而不是重新缩放后的大小。

您知道检索图像当前大小的方法吗?