JPGraph:如何在 x 轴上方隐藏绘图线?
JPGraph : how to hide plot line when going above x-axis?
我在 JPGraph 中为我的绘图线设置自定义比例,使用:
$graph->SetScale('linlin', 60,200);
你可以在这里看到结果:http://screencast.com/t/jMKHg1XUis
显示是正确的,但我想隐藏超出范围(x 轴以下)的图。
在文档中找不到有关此类功能的任何信息。
Graph 的 class 参考有一个 SetClipping 函数。来自文档:
Enable or disable clipping outside the plot area. If clipping is
enabled then only the part of the graph exactly inside the plot area
will be visible.
Clipping may come in handy when you for example set a manual scale and
have data points outside the specified range.
By default clipping is disabled.
Note 1: Clipping is only supported for graphs at 0 or 90 degrees
rotation and will generate an error message if enabled together with
any other angle.
Note 2: The clipping is implemented with a O(1) algorithm in terns of
data size.
您需要通过调用函数来启用裁剪:
$graph->SetClipping();
我在 JPGraph 中为我的绘图线设置自定义比例,使用:
$graph->SetScale('linlin', 60,200);
你可以在这里看到结果:http://screencast.com/t/jMKHg1XUis
显示是正确的,但我想隐藏超出范围(x 轴以下)的图。 在文档中找不到有关此类功能的任何信息。
Graph 的 class 参考有一个 SetClipping 函数。来自文档:
Enable or disable clipping outside the plot area. If clipping is enabled then only the part of the graph exactly inside the plot area will be visible.
Clipping may come in handy when you for example set a manual scale and have data points outside the specified range.
By default clipping is disabled.
Note 1: Clipping is only supported for graphs at 0 or 90 degrees rotation and will generate an error message if enabled together with any other angle.
Note 2: The clipping is implemented with a O(1) algorithm in terns of data size.
您需要通过调用函数来启用裁剪:
$graph->SetClipping();