爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 184|回复: 3

[图形美化] 坐标轴标签格式精细设置,神级坐标里没找到修改命令,求大神指导

[复制链接]

新浪微博达人勋

发表于 2025-3-12 15:40:15 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
最近发论文,编辑对图要求较高,天气环流形势坐标轴标签数字和°还有表示经纬度的N等统一要用新罗马字体和小五号大小,清风的神极坐标里需要修改哪条命令啊?还是直接string写上去呢?烦请前辈们指导一下。
0312.PNG
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2025-3-12 15:42:58 | 显示全部楼层
麻烦前辈们指导一二,我按照神极坐标画出来的只有数字是新罗马字体,°和字母不是新罗马,是grads自带的字体,精细设置没找到在哪里修改,我想修改成例图中这样。
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 3 天前 | 显示全部楼层
可以看看,但不知道有没有用
set font
This command allows the user to select the font for subsequent text operations. This command was enhanced for version 2.1, when new font controls were introduced with the addition of graphics rendering using the Cairo library.

Syntax
set font number                     (GrADS version 2.0* and earlier)
set font number <file filename>     (GrADS version 2.1* and later)

Usage Notes
Use font number 0 through 5 to specify which Hershey font to use.
Use font number 6 through 9 for customized font files. See Hershey Font Files for more information on how to create these files.
For all GrADS versions 2.0 and earlier, 0-9 are the only font numbers that are available.

Starting with GrADS version 2.1, additional font numbers 10 through 99 are available to define or set a Cairo font based on a local font file. When defining a new font, use the 'set font number file filename' syntax. Make sure you include the file keyword followed by the filename of the local font file, including its full path. Spaces are allowed in filename (see examples below), but be careful that no extra whitespace is added on at the end of the filename argument (this can happen when using the tab key to fill out a filename instead of typing it out entirely). When setting a previously-defined font, use the 'set font number' syntax to draw text using that defined font -- it is not necessary to re-define the font every time you want to use it. Defining a new font number will also set the font to be that number.

If 'set font number' is invoked with a number between 10 and 99, but that font number has not yet been defined, a default generic sans-serif font will be used. Similarly, if a user-specified font file cannot be opened or is in an unsupported format, then the display will default to a generic sans-serif font.

Please read the documentation page on Font Control in GrADS for more information about using fonts in GrADS version 2.1.

It is possible to temporarily override the font in a string of text by using the back quote character (`) followed by a single-digit font number. To override fonts with 2-digit font numbers, use back quote with an f (`f) followed by the font number. Examples are below.

If your build of GrADS version 2.1+ is not enabled with the Cairo graphics library, you will get an error message if you use set font to try to set a font number greater than 9.



Examples
  set font 10 file /Library/Fonts/AmericanTypewriter.ttc
  set font 11 file /Library/Fonts/Kannada MN.ttc
  set font 12 file /System/Library/Fonts/AppleGothic.ttf
  set font 13 file /usr/share/fonts/default/Type1/a010013l.pfb
  set font 14 file /usr/share/msttcorefonts/tahoma.ttf
  set font 15 file /usr/share/X11/fonts/TTF/luximbi.ttf

  set font 20 file /usr/share/fonts/default/ghsostcript/bchr.pfa
  set font 21 file /usr/share/fonts/default/ghsostcript/bchri.pfa
  set font 22 file /usr/share/fonts/default/ghsostcript/bchb.pfa
  set font 23 file /usr/share/fonts/default/ghsostcript/bchbi.pfa

  set font 20
  draw string 1 1 For emphasizing text, use `f22bold, `f21italic, `f20or `f23both

  set font 0
  draw string 1 1 `1Use Hershey font 2 to `2emphasize `1a particular word
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 前天 09:03 | 显示全部楼层
顶楼上,去下载个new times roman, 然后楼上那样设置就好
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表