问题标签 [xscale]
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.
matlab - 以对数设置 xscale 时,contourf 不起作用
我正在尝试使用 coutourf() 但使用 xscale 对数进行绘图:
但是当我设置 xscale 时,我失去了填充(变成了一种轮廓但没有颜色)。我尝试使用 GUI 进行绘图,但结果相同
更新:我想我缩小了问题的范围。这是因为我使用了从 0 开始的 x 值。 这是我的示例(下一个是完全相同的数据,但只是将 xcale 放入日志中)
您无法通过以下方式获得相同的结果:
我认为这是由于我的数据中非常拖尾的分布以及与颜色条的线性分割。任何想法让 x 从 0 开始?有对数刻度颜色条吗?(我尝试用 eps 替换它,但仍然不是很好)。谢谢
PS:我不能在这里放另一个链接是我的数据:www.filedropper.com/dd_3
lua - 在transition.to中的corona sdk xScale
如何xScale
在transition.to
一段时间内使对象变大这是我的行代码
假设我希望这种情况发生 5 秒钟,然后返回默认大小xscale =1
和yscale = 1
.
r - ggplot few X-scale bold, rest not bold
I have a ggplot with on the x-scale the numbers from 0 to 21. I want the numbers 0,4,6,9,12,16,18 and 21 in bold, the rest has to stay like it is normal (grey, not bold)
How do I do that?
d3.js - dc.js 过滤后修改时间刻度x轴
单击按钮后,我正在按日期以编程方式过滤 dc.js 时间序列图表。我希望代表时间尺度的 x 轴在应用我的数据过滤器时发生变化。相反,xaxis 保持不变,尽管图表在日期的任何一侧都下降了。我的情况可以通过在另一个问题中创建的 jsfiddle 来证明(在 dc.js 中 添加过滤器/Crossfilter 不更新图表)我不清楚该问题是否得到回答,但建议的 jsfiddle 演示了我遇到的问题:http://jsfiddle.net/PYeFP/5/
您可以看到,当您单击过滤器按钮时,数据已被适当过滤,但 xAxis 包含相同范围的值。
我尝试重新创建 x 比例并将其分配给图表的“x”属性:getCompositeDemandLine().x(xScale); //xScale 包含新的最小、最大日期
但这没有任何效果。
有没有办法使图表的域在过滤时发生变化?如果没有,有没有办法删除图表以便重新创建?
d3.js - Scale not giving expected values in d3.js
I'm pretty out of solutions here I'm creating a multi graph, with graps added dynamically by user Which is why I had to give variable names to the scales using the window method All seemed to work awesome, looks good also, however I am not seeing the values I am supposed to on the graph My initial values come from ajax
for example the start_range and end_range are 130,0 second ones are 290-160 basically increasing from top to bottom with 130 (height of each graph) and the 30 px I put between them the domains are 1415,1500 for the first graph and -20,20 for the second
And now the problems - I am trying to put a threshold line at 1437 in the first and 0 in the second
On the graph it is positioned somewhere near 1457 in the first case and 10 in the second (where it should be 0)
I thought maybe I mixed up some margins but the difference from where it is and where i want it is 20 in the first case and 10 in the second so i cannot force something like -20
I tried making 0 all the margins, still gives me wrong positioned line
How come it's there?
I tried alert(window['scale_'+param_name](1437))
and it gives me 95
I read the way the scales are transformed, so I've done it too my initial interval 1415-1500, difference=85 my graph interval 0-130, difference 130
but 1437 / 0.65 = 2210,7
I feel totally lost
And the second question is -.if I create the line and the circles based on my data, how come they are in different positions in the graph? (the circles are on top) which is correct?
I've desperately searched and nothing emerged Please just give me a hint if possible
Here is a working fiddle https://jsfiddle.net/zk5j5fno/ Thank you
ios - 在动画开始时自动调整纹理大小
我有一个问题。对于我的对象的动画,我在 Player 类中使用此方法:
当我使用虚拟摇杆时,在函数 touchesBegan() 中调用此方法。我的精灵的方向取自函数 touchesMoved() 中的条件:
但是我有一个问题,当我开始移动时,我的精灵的大小发生了变化,他的宽度和高度都变大了。如果我将 SKAction.animate 中的 resize 更改为 false,则高度是正常的,但宽度会在动画的所有时间内更改为小且正常。使用以下参数创建对象“玩家”:
有谁知道问题是什么?
javascript - D3 多折线图无法正确显示 X 轴值
我在我的应用程序中实现了一个 D3v3 多折线图。由于我对 D3 图表很陌生,所以我寻找了一些在线资源并想出了这个。最初,我必须在 X 轴上显示 Years 并且它工作正常。这个小提琴显示了它(https://jsfiddle.net/yasirunilan/tz57wc29/13/)。然后根据一个新要求,我需要在 X 轴上显示月份的数据分布,不同之处在于 X 轴并不总是从一月份开始。正如数据集中给出的那样,它可能从一年的 10 月到一年的 10 月到明年的 9 月开始。在这种情况下,我在图表中显示线和 X 轴值时遇到了问题。有人可以为这个问题提供方向吗?