通过x = 0和y = 0绘制轴 [英] Draw axis thru x=0 and y=0

查看:104
本文介绍了通过x = 0和y = 0绘制轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组数据正在绘制为散点图,在两个轴上都具有正值和负值.当我在Flot中绘制此图形时,默认情况下将在底部和左侧绘制轴.有没有办法使它绘制穿过图形中心的轴? @ X = 0和Y = 0?

I have a set of data that I'm plotting as a scatter graph which has both positive and negative values on both axis. When I plot this in Flot, the axis are draw at the bottom and the left by default. Is there a way to make it draw the axis through the center of the graph? @X=0 and Y=0?

换句话说,代替这个:

我想要这样的东西:

推荐答案

在默认的flot中是不可能的.我敢肯定,如果您想深入研究源代码,它可能会被破解,但是flot本身仅在y轴上支持左/右,在x轴上支持上/下.

That isn't possible in the default flot. I'm sure it could be hacked in if you wanted to dig into the source, but flot by itself only supports left/right for the y-axis, and top/bottom for the x-axis.

这篇关于通过x = 0和y = 0绘制轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆