如何定义从现有&QUOT配套轴凹槽;步骤列表"凹槽、步骤、定义、列表

2023-09-11 23:19:16 作者:如夏

我需要一种方法来对准刻度上的两个独立的轴,同时能​​够控制的台阶值(刻度线之间的价值),其中两个轴的开始标志0,最终在不同的最大值。

I need a way to align tick marks on two separate axis, while being able to control the "step" value (value between tick marks), where both axis start at mark 0 and end on a different maximum value.

为什么这个问题:

海军报,JS的图表包有一个选项来调整刻度线,但是当我做,我无法控制的步进值。然而,我可以直接控制步进值,但后来我失去对准刻度线的能力。不过,我可以恢复到定义自己的最大值和步长值,得到我所需要的(对准刻度线,同时保持所需的步进值),但我需要一些帮助。产生这个问题(阅读详细内容)。

Flot, the JS charting package has an option to align tick marks, but when I do, I cannot control the step value. I can however control the step value directly, but then I lose the ability to align tick marks. I can however revert to defining my own max and step values, to get what I need (aligned tick marks while maintaining desired step value), but I need some help. yielding this question (read on for details).

示例

让一个上轴a和b的最大值,是轴B上的最大值。

Let a be maximum value on axis A and b, be maximum value on axis B.

在这个例子中,让= 30,和b = 82。 比方说,我想6刻度线(而不是在轴终点计算额外的刻度标记)。在现实中,我猜在6尝试了几个后。

In this example, let a = 30, and b = 82. Let's say I want 6 tick marks (not counting the extra tick mark at end of axis). In reality I guessed at 6 after trying out a few.

在我有刻度线所需的电话号码,我可以做这样的事情:

Once I have a desired number of tick marks, I can do something like this: