为SAME轴上的Tic设置不同的颜色 [英] Set different Color for Tics on SAME Axes
问题描述
是否可以在相同的轴上使用不同颜色的或样式的tic。
Is it possible to use different coloured or styled tics on the same axes.
tics: 0,1,1.5,2
,我希望将 0
和 2
着色为红色
或粗体
。
tics: 0,1,1.5,2
and I want the 0
and the 2
colored red
or bold
.
对于多重绘图
来说是个不错的选择,其中有关于相同测量的图,并且您想标记y或x范围在不同的情节中没有过多的负担。现在对我来说,另一种选择是在y轴上显式地写出范围,但是用我的问题的解决方案会更平滑。我检查了 mxtics
,但是根据我的经验,无法为主要
和设置不同的颜色次要
动态。
Would be great for multiplots
where have plots regarding the same measurements and you want to mark the y or x range in the different plot without overloading it to much. the alternative for me right now is to explicitly write the range on the y axes but it would be smoother with a solution for my question. I checked mxtics
but from my experience it is not possible to set different colors for major
and minor
tics. But maybe I missed something.
推荐答案
这就是我在评论中的意思:
Here is what I mean in my comment:
set style arrow 1 nohead linecolor rgb "red" linewidth 2
set xtics pi format "%.0P"
set arrow 1 from -1.5*pi,-.38 to -1.5*pi,-.4 as 1
set arrow 2 from 1.5*pi,-.38 to 1.5*pi,-.4 as 1
plot [-4*pi:4*pi] sin(x)/x
收益率
这篇关于为SAME轴上的Tic设置不同的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!