dsfdsfdsfdsf1223 2011-08-09 21:39
浏览 8
已采纳

图轴的最小值

I am trying to make a bargraph that plots times.

So what the technical issue we are trying to get the minimum plot value to something.

For example if what I was trying to graph was 4 min 30 s (4:30), 4:45, 4:15, and 4:20, I would like the y=0 value to be 4 minutes and each increment in the y axis to be 1 second.

Effectively, it would be a bargraph of 30, 45, 15, and 20 with the y = 0 axis labelled as. Is there anyway of doing this without have to man handle the data?

Help please if you know how to do this with jpgrah.

Otherwise, does anyone know what this feature is called in general so I can google it up?

I was reading the documentation of jpgrah: SetYBase seemed a like a good candidate but all it seemed to do when I played with the parameters was shrink the upper limit y-value [Specify the start plot for bars, (minimum Y-value). By default the base uses the value 0 as base.]

  • 写回答

1条回答 默认 最新

  • dongliao2241 2011-09-20 01:40
    关注

    Found the appropriate method in the JPGraph documentation:

    $aGraph = new Graph($aWidth,$aHeight,'auto'); $graph->SetScale('textlin',$aMinY,$aMaxY);

    $aMinY and $aMaxY give the minimum and maximum values included in the graph. Also, they are optional arguments.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看