为SAME轴上的Tic设置不同的颜色 [英] Set different Color for Tics on SAME Axes

查看:135
本文介绍了为SAME轴上的Tic设置不同的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在相同的轴上使用不同颜色的或样式的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 mxticsbut from my experience it is not possible to set different colors for majorand minortics. 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屋!

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