我很难设置一个轴的范围,使其最小值小于1。我知道,任何小于0的值都不能被绘制出来--我不明白为什么不能看到低于1的值,除非我能够找到它们。有什么原因吗?还是解决这个问题的方法?
发布于 2014-05-30 22:23:18
虽然这可能是按照设计的,你仍然可以达到你想要的影响,扩大你的数据到对数轴的有效范围。然后可以重写label函数来设置所需的标签。很烦人,但也许能满足你的需要。
class MyLogarithmicAxis : LogarithmicAxis
{
protected override string GetFormattedDataValueInternal(double dataValue, string formatString)
{
if (dataValue == 1)
{
dataValue = .1;
}
if (dataValue == 100)
{
dataValue = 10;
}
if (dataValue == 1000)
{
dataValue = 100;
}
return base.GetFormattedDataValueInternal(dataValue, formatString);
}
}https://stackoverflow.com/questions/23910366
复制相似问题