博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IDL change the ticks
阅读量:2443 次
发布时间:2019-05-10

本文共 10418 字,大约阅读时间需要 34 分钟。

[XYZ]CHARSIZE


Accepted by: , , , , . System variable equivalents: ![XYZ].CHARSIZE.

The size of the characters used to annotate the axis and its title when Hershey fonts are selected. This keyword does not apply when hardware (i.e. PostScript) fonts are selected. This field is a scale factor applied to the global scale factor set by !P.CHARSIZE or the keyword CHARSIZE.

TICKLEN


Accepted by: , , , , . System variable equivalent: !P.TICKLEN.

Controls the length of the axis tick marks, expressed as a fraction of the window size. The default value is 0.02. TICKLEN of 1.0 produces a grid, while a negative TICKLEN makes tick marks that extend outside the window, rather than inwards. A value of -0.02 makes tick marks that extend away from the plot. Individual axis ticks can be controlled with the keyword.

For example, to produce outward-going tick marks of the normal length:

, X, Y, TICKLEN = -0.02

To provide a new default tick length, set !P.TICKLEN.

[XYZ]THICK


Accepted by: , , , , . System variable equivalent: ![XYZ].THICK.

This keyword controls the thickness of the lines forming the xy, or z axes and their tick marks. A value of 1.0 is the default.

[XYZ]TICK_GET


Accepted by: , , , , .

A named variable in which to return the values of the tick marks for the designated axis. The result is a double precision floating-point array with the same number of elements as ticks.

For example, to retrieve in the variable V the values of the tick marks selected by IDL for the Y axis:

, X, Y, YTICK_GET = V

[XYZ]TICKINTERVAL


Accepted by: , , , , .

variable equivalent: ![XYZ].TICKINTERVAL

Set this keyword to a scalar indicating the interval between major tick marks for the first axis level. The default value is computed according to the axis range ([XYZ]RANGE) and the number of major tick intervals ([XYZ]TICKS). This keyword takes precedence over [XYZ]TICKS.

For example, if TICKUNITS=[“Seconds”, “Hours”, “Days”], and XTICKINTERVAL=30, then the interval between major ticks for the first axis level will be 30 seconds.

[XYZ]TICKLAYOUT


Accepted by: , , , , . System variable equivalent: ![XYZ].TICKLAYOUT.

Set this keyword to a scalar that indicates the tick layout style to be used to draw each level of the axis.

Valid values include:

  • 0 = The axis line, major tick marks and tick labels are all included. Minor tick marks only appear on the first level of the axis. This is the default tick layout style.
  • 1 = Only the labels for the major tick marks are drawn. The axis line, major tick marks, and minor tick marks are omitted.
  • 2 = Each major tick interval is outlined by a box. The tick labels are positioned within that box (left-aligned). For the first axis level only, the major and minor tick marks will also be drawn.

Note: For all tick layout styles, at least one tick label will appear on each level of the axis (even if no major tick marks fall along the axis line). If there are no major tick marks, the single tick label will be centered along the axis.

[XYZ]TICKLEN


Accepted by: , , , , . System variable equivalent: ![XYZ].TICKLEN.

This keyword controls the lengths of tick marks (expressed in normal coordinates) for the individual axes. This keyword, if nonzero, overrides the global tick length specified in !P.TICKLEN, and/or the  keyword parameter, which is expressed as a fraction of the window size in the tick mark’s direction.

[XYZ]TICKNAME


Accepted by: , , , , . System variable equivalent: ![XYZ].TICKNAME.

A string array of up to 30 elements that controls the annotation of each tick mark. If omitted or if a given string element contains an empty string, IDL labels the tick mark with its value. To suppress the tick labels, supply a string array of one-character long, blank strings, i.e., REPLICATE(' ', N). Empty strings force IDL to number the tick mark with its value.

Note: If there are n tick-mark intervals, there are n + 1 tick marks and labels.

[XYZ]TICKS


Accepted by: , , , , . System variable equivalent: ![XYZ].TICKS.

The number of major tick intervals to draw for the axis. If this keyword is set to zero or omitted, IDL selects from three to six tick intervals. Setting this value to n, where n > 1, produces exactly n tick intervals, and n+1 tick marks. Setting this value equal to 1 suppresses major tick marks. (Set =1 to suppress minor tick marks.)

[XYZ]TICKUNITS


Accepted by: , , , , . System variable equivalent: ![XYZ].TICKUNITS.

Set this keyword to a string or a vector of strings indicating the units to be used for axis tick labeling. If a vector of strings is provided, the axis will be drawn in multiple levels, where each string represents one level in the specified units.

Note: When creating multiple-level axes, you may need to adjust the plot positioning using the  or keywords in order to ensure that axis labels and titles are visible in the plot window.

The order in which the strings appear in the vector determines the order in which the corresponding unit levels will be drawn. The first string corresponds to the first level (the level nearest to the primary axis line).

Valid unit strings include:

  • 'Numeric'
  • 'Years'
  • 'Months'
  • 'Days'
  • 'Hours'
  • 'Minutes'
  • 'Seconds'
  • 'Time' - Use this value to indicate that the tick values are time values; IDL will determine the appropriate time intervals and tick label formats based upon the range of values covered by the axis.
  • ''- Use the empty string to indicate that no tick units are being explicitly set. This implies that a single axis level will be drawn using the 'Numeric' unit. This is the default setting.

If any of the time units are utilized, the tick values are interpreted as Julian date/time values.

Note that the singular form of each of the time value strings is also acceptable (e.g, TICKUNITS='Day' is equivalent to TICKUNITS='Days').

Note: Julian values must be in the range -1095 to 1827933925, which corresponds to calendar dates 1 Jan 4716 B.C.E. and 31 Dec 5000000, respectively.

[XYZ]TICKV


Accepted by: , , , , . System variable equivalent: ![XYZ].TICKV.

The data values for each tick mark, an array of up to 60 elements. You can directly specify these values, producing graphs with arbitrary tick marks. If you do this, IDL scales the axis from the first tick value to the last unless you directly specify a range.

Note: To specify the number of ticks and their values exactly, set [XYZ]TICKS=N(where N > 1) and [XYZ]TICKV=Values, where Values has N+1 elements.

[XYZ]TICKFORMAT


Accepted by: , , , , . System variable equivalent: ![XYZ].TICKFORMAT.

Set this keyword to a string or a vector of strings. The string can be a format string or a string containing the name of a function that returns a string to be used to format the axis tick mark labels. If a vector is provided, each string corresponds to a level of the axis. The  keyword determines the number of levels for an axis.

Each string is one of the following:

A format code:

If the string begins with an open parenthesis, it is treated as a standard format string. See  for more information on format codes.

Example 1: Display the X axis tick values using a format of F6.2 (six characters, with 2 places after the decimal point):

, X, Y, XTICKFORMAT='(F6.2)'

Example 2: Display the Y tick values using the “dollars and cents” format $dddd.dd:

, X, Y, YTICKFORMAT='("$", F7.2)'

The string 'LABEL_DATE' :

Set [XYZ]TICKFORMAT to the string 'LABEL_DATE' to create axes with date labels. The formatting of the labels is specified by first calling  with the DATE_FORMAT keyword.

Example: Use the  function as the callback function to display the X tick values in a date/time format:

dummy = (DATE_FORMAT='%M %Z')
mytimes = (12, UNITS='MONTHS', START=(1,1,2000))
y = (12)
, mytimes, y, XTICKUNITS='Time', XTICKFORMAT='LABEL_DATE'

See the  section of LABEL_DATE for more extensive examples.

The name of a user-defined function:

If the string does not begin with an open parenthesis, it is interpreted as the name of a callback function to be used to generate tick mark labels. This function is defined with either three or four parameters, depending on whether [XYZ]TICKUNITS is specified:

If [XYZ]TICKUNITS is not specified, the callback function is called with three parameters, AxisIndex, and Value, where:

  • Axis is the axis number: 0 for X axis, 1 for Y axis, 2 for Z axis.
  • Index is the tick mark index (indices start at 0).
  • Value is the data value at the tick mark (a double-precision floating point value).

Note: Value is a double-precision floating-point value that represents the Julian date. The Julian date follows the astronomical convention, where Julian date 0.0d corresponds to 1 Jan 4713 B.C.E. at 12 pm.

If [XYZ]TICKUNITS is specified, the callback function is called with four parameters, AxisIndexValue, and Level, where:

  • AxisIndex, and Value are the same as described above.
  • Level is the index of the axis level for the current tick value to be labeled (level indices start at 0).

Example 1: Use a callback function to display the Y tick values as a percentage of a fixed value. Note that because we don’t specify [XYZ]TICKUNITS, we do not include the Level parameter in our function definition:

YTICKS, , index, value
fixvalue = 389.0d
pvalue = (value/fixvalue) * 100.0d
, (pvalue, FORMAT='(D5.2,"%")')
 
 
use_callback
   Y = (10)
   , Y, YTICKFORMAT='YTICKS'
 

Example 2: Create a two-level X axis. Display the X tick values in a customized date/time format that shows the number of days open for business for each month on one level, and marks leap years with an asterisk on another level:

XTICKS, , index, value, level
 
level OF
0:  ; months
; Number of days open for business in given month:
, value, month
open = [18,19,23,20,22,22,19,10,20,21,22,14]
nbdays = open[month]
; Return a string containing the month name plus
; the number of business days in parentheses:
, (value, nbdays, $
FORMAT='(C(CMoA), "(", I2, ")")')
 
1:  ; years
; Generate a string for the year.
yrStr = (value, FORMAT='(C(CYI))')
; Determine if a leap year.  If so,
; append an asterisk to the string.
, value, mo, da, yr
(yr  4  0)
(yr  100  0)  $
isLeap = (yr  400)  0 $
$
IsLeap = 1b
$
isLeap = 0b
(isLeap  0b)  $
yrStr = yrStr + '*'
, yrStr
 
 
 
 
 
plot_sales
 
myDates = (12, UNITS='Months', START=(1,1,2000))
sales = [180,190,230,200,220,220,190,100,200,210,220,140]
, myDates, sales, XTICKUNITS=['Months', 'Years'], $
XTICKFORMAT='XTICKS', XTITLE = 'Date (* = Leap Year)', $
YTITLE='Sales (units)', POSITION = [0.2, 0.2, 0.9, 0.9]
 
 

转载地址:http://dviqb.baihongyu.com/

你可能感兴趣的文章
改善网站安全性的5种方法
查看>>
c++stl和std_C ++ STL转发列表容器– std :: forward_list
查看>>
Android Google Analytics(分析)集成教程
查看>>
回文编号的Pl / SQL程序
查看>>
解决错误:左值必须作为赋值的左操作数
查看>>
android mvp示例_Android日期选择器示例
查看>>
android mvp示例_Android使用SwipeRefreshLayout示例向下拉或向下滑动以刷新
查看>>
在Android中获取当前日期的4种方法
查看>>
Android将图像转换为Base64字符串或将Base64字符串转换为图像
查看>>
使用Firebase教程的Android实时聊天应用程序
查看>>
Android圆形按钮示例
查看>>
shell排序 c+_C和C ++中的Shell Sort程序
查看>>
c语言双精度的格式说明符_C中的格式说明符
查看>>
生产者消费者问题c语言_C中的生产者消费者问题
查看>>
继承中的钻石问题
查看>>
0-1背包问题 c语言_动态编程在C中的0-1背包问题
查看>>
firebase fcm_使用Firebase Cloud Messaging(FCM)的Android推送通知
查看>>
Android使用Volley将图像上传到服务器
查看>>
c语言 字符串字符反向储存_反向字符串的PL / SQL程序
查看>>
斐波那契程序_Fibonacci系列的PL / SQL程序
查看>>