IDL plot

CLIP


Accepted by: CONTOUR ProcedureDRAW_ROI ProcedureOPLOT ProcedurePLOT Procedure,PLOTS Procedure,POLYFILL Procedure, SHADE_SURF ProcedureSURFACE Procedure TV ProcedureTVCRS ProcedureXYOUTS Procedure. System variable equivalent: !P.CLIP.

The coordinates of a rectangle used to clip the graphics output. The rectangle is specified as a vector of the form [X0Y0,X1Y1], giving coordinates of the lower left and upper right corners, respectively. The default clipping rectangle is the plot window, the area enclosed within the axes of the most recent plot. Coordinates are specified in data units unless an overriding coordinate unit specification keyword is present (i.e., NORMAL or DEVICE). If the clipping is provided in data or normalized units, the actual clipping rectangle is computed by converting those values to device units. The clipping itself always occurs in device space.

Note: The default is not to clip the output of PLOTS and XYOUTS. To enable clipping include the keyword parameter NOCLIP = 0. With PLOTS, POLYFILL, and XYOUTS, this keyword controls the clipping of vectors and vector-drawn text.

For example, to draw a vector using normalized coordinates with its contents clipped within a rectangle covering the upper left quadrant of the display:

PLOTS, X, Y, CLIP=[0.,.5,.5,1.0], /NORM, NOCLIP=0

LINESTYLE


Accepted by: DRAW_ROI Procedure,OPLOT ProcedurePLOT Procedure,PLOTS ProcedurePOLYFILL Procedure,SURFACE Procedure. System variable equivalent: !P.LINESTYLE.

This keyword indicates the line style used to draw lines; it indicates the line style of the lines used to connect the data points. This keyword should be set to the appropriate index for the desired linestyle as described in the following table.

IDL Linestyles

Index

Linestyle

0

Solid

1

Dotted

2

Dashed

3

Dash Dot

4

Dash Dot Dot

5

Long Dashes

NOERASE


Accepted by: AXIS ProcedureCONTOUR ProcedurePLOT ProcedureSURFACE Procedure. System variable equivalent: !P.NOERASE.

Specifies that the screen or page is not to be erased. By default, the screen is erased, or a new page is begun, before a plot is produced.

Note: If the NOERASE keyword (or !P.NOERASE) is set, the value of the BACKGROUND keyword (or !P.BACKGROUND) is ignored.

PSYM


Accepted by: DRAW_ROI ProcedureOPLOT ProcedurePLOT ProcedurePLOTS Procedure. System variable equivalent: !P.PSYM.

The symbol used to mark each data point. Normally, PSYM is 0, data points are connected by lines, and no symbols are drawn to mark the points. Set this keyword, or the system variable !P.PSYM, to the symbol index as shown in the table below to mark data points with symbols. When a positive value is supplied for PSYM, no lines are used to connect the data points (except when PSYM=10). The keyword SYMSIZE is used to set the size of the symbols.

Values for the PSYM Keyword

PSYM Value

Plotting Symbol

1

Plus sign (+)

2

Asterisk (*)

3

Period (.)

4

Diamond

5

Triangle

6

Square

7

X

8

User-defined. See USERSYM Procedure procedure.

9

Undefined

10

Histogram mode. Horizontal and vertical lines connect the plotted points, as opposed to the normal method of connecting points with straight lines. See Histogram Mode for an example.

Negative values of PSYM cause the symbol designated by PSYM to be plotted at each point with solid lines connecting the symbols. For example, a value of -5 plots triangles at each data point and connects the points with lines. Histogram mode is the exception to this rule; since the points are already connected when PSYM=10, specifying the value -10 is meaningless, and will result in an error.

The following IDL code plots an array using points, and then overplots the smoothed array, connecting the points with lines:

;Plot using points.
PLOT, A, PSYM=3 
 
;Overplot smoothed data.
OPLOT, SMOOTH(A,7)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
目录 第一章 起步篇................................................................................................................. 9 本章概述................................................................................................................... 9 撰写本书的背景................................................................................................. 9 如何使用本书..................................................................................................... 9 IDL 所需的版本............................................................................................... 10 IDL 运行期间所需颜色的数量.......................................................................... 10 少于 150 种颜色该怎样?.......................................................................... 10 多于 256 种颜色该怎样?.......................................................................... 10 创建 IDL 的启动文件................................................................................................11 本书的风格习惯.......................................................................................................11 大写..................................................................................................................11 注释................................................................................................................. 12 续行符............................................................................................................. 12 本书中所用的 IDL 程序和数据文件.......................................................................... 13 安装程序和数据文件........................................................................................ 13 下载本书所用的程序和数据文件....................................................................... 13 拷贝数据文件................................................................................................... 14 获取更多的帮助............................................................................................... 14 使用 IDL 命令......................................................................................................... 14 IDL 命令解析................................................................................................... 15 位置参数................................................................................................... 15 关键字参数............................................................................................... 15 IDL 过程和函数........................................................................................ 16 用 IDL 命令帮助........................................................................................ 16 创建命令日志............................................................................................ 17 创建变量.......................................................................................................... 17 动态改变变量的属性................................................................................. 18 注意整型变量............................................................................................ 19 使用矢量和数组...................................................................................................... 20 创建矢量.......................................................................................................... 20 数组下标的应用............................................................................................... 21 数组的建立...................................................................................................... 21 使用 IDL 图形窗口.................................................................................................. 22 图形窗口的建立............................................................................................... 22 确定当前图形窗口............................................................................................ 23 删除图形窗口................................................................................................... 23 图形窗口的位置和尺寸..................................................................................... 24 将图形窗口设置到显示器最前面....................................................................... 24 第二章 简单的图形显示............................................................................................... 25 本章概述................................................................................................................. 25 IDL 中简单的图形显示............................................................................................ 25 3 创建线画图............................................................................................................. 25 定制线画图............................................................................................................. 28 改变线条的线型和粗细..................................................................................... 28 用符号代替线条表示数据................................................................................. 29 用线条和符号来显示数据.......................................................................... 30 创建自己的图形符号................................................................................. 30 用不同的颜色绘制线画图................................................................................. 31 限定线画图的范围............................................................................................ 31 改变线画图的风格............................................................................................ 32 在线画图上绘出多种数据集..................................................................................... 34 第三章 图像数据处理.................................................................................................... 35 本章概要................................................................................................................. 35 图像处理................................................................................................................. 35 显示图像.......................................................................................................... 36 用颜色表分段表示图像.............................................................................. 38 在 24 位显示器上用不同的颜色表显示图像................................................ 39 控制图像显示顺序..................................................................................... 41 改变图像尺寸............................................................................................ 41 在显示窗口中定位图像.............................................................................. 42 用归一化的坐标来定位图像....................................................................... 43 从显示器中读取图像................................................................................. 45 在 24 位显示器上抓屏............................................................................... 45 IDL 中基本的图像处理..................................................................................... 46 直方图均衡化............................................................................................ 46 平滑图像................................................................................................... 47 消除图像噪声............................................................................................ 49 增强图像边缘............................................................................................ 49 图像的频域滤波........................................................................................ 50 第四章 图形显示技术.................................................................................................... 52 本章概要................................................................................................................. 52 IDL 的颜色运用...................................................................................................... 53 使用索引颜色模式和 RGB颜色模式................................................................. 53 静态与动态颜色视觉........................................................................................ 54 在 8 位显示器上指定颜色................................................................................. 54 在 24 位显示器上指定分解后的颜色................................................................. 55 在 24 位显示设备上指定没有分解过的颜色....................................................... 56 决定颜色分解的开与关..................................................................................... 56 在 24 位显示设备上装载颜色表........................................................................ 57 获得颜色表的拷贝............................................................................................ 57 修改和创建颜色表............................................................................................ 58 创建自己的轴标注................................................................................................... 60 调整轴刻度间隔............................................................................................... 60 格式化轴的标注............................................................................................... 61 编写刻度格式函数............................................................................................ 62 4 用 IDL 处理残缺的数据.................................................................................... 64 用 IDL 建立三维坐标系.................................................................................... 66 建立三维散点图........................................................................................ 66 从图形原点定位 3D 坐标轴........................................................................ 68 组合简单图形显示............................................................................................ 69 第五章 图形显示技巧................................................................................................... 71 本章概要................................................................................................................. 71 将光标用于图形显示............................................................................................... 72 什么时候返回的光标位置?.............................................................................. 72 哪一个鼠标键和光标共同作用呢?................................................................... 73 用光标标注图形输出........................................................................................ 73 在图像上使用 Cursor 命令......................................................................... 74 在循环中使用 Cursor 命令......................................................................... 76 从显示中删除注释................................................................................................... 76 删除注释的异或法............................................................................................ 76 删除注释的设备拷贝法..................................................................................... 78 画一个橡皮筋方框................................................................................................... 80 图形窗口的滚动............................................................................................... 81 Z图形缓冲区中的图形显示技巧.............................................................................. 82 Z图形缓冲区的实现......................................................................................... 82 一个 Z图形缓冲区实例:两个曲面................................................................... 83 使 Z图形缓冲区成为当前设备................................................................... 83 配置 Z图形缓冲区.................................................................................... 83 将物体装入到 Z图形缓冲区中................................................................... 83 对投影面进行拍照..................................................................................... 84 在显示设备上显示结果.............................................................................. 84 Z图形缓冲区的一些奇怪特点........................................................................... 84 用 Z图形缓冲区使图像变形............................................................................. 85 Z图形缓冲区中的透明效果.............................................................................. 87 将 Z图形缓冲区效果与体数据着色相结合........................................................ 87 第六章 在IDL 中读写数据............................................................................................. 88 本章概要................................................................................................................. 88 打开文件进行读写................................................................................................... 89 查找和选择数据文件............................................................................................... 89 选择文件名...................................................................................................... 89 选择目录名...................................................................................................... 90 寻找文件.......................................................................................................... 90 构造文件名...................................................................................................... 91 获取逻辑设备号...................................................................................................... 91 直接使用逻辑设备号........................................................................................ 91 让 IDL 管理逻辑设备号.................................................................................... 92 判断哪些文件和哪些逻辑设备号相连................................................................ 92 读写格式化数据........................................................................................ 92 写自由格式文件........................................................................................ 92 5 读自由格式文件........................................................................................ 93 读取自由格式文件的规则.......................................................................... 93 读写自由格式文件的实例.......................................................................... 95 用确定的文件格式写入.............................................................................. 99 从字符串中读取格式数据.........................................................................100 读写二进制数据.....................................................................................................100 读取二进制图像数据文件................................................................................101 写二进制图像数据文件....................................................................................102 读取带有文件头的二进制数据文件..................................................................102 二进制数据文件的一些问题.............................................................................103 用关联变量存取二进制数据文件......................................................................104 关联变量的一些优点................................................................................104 定义关联变量...........................................................................................104 读写常用文件格式的文件................................................................................106 创建彩色 GIF 文件...................................................................................106 写 GIF 文件..............................................................................................106 读 GIF 文件..............................................................................................107 创建彩色 JPEG 文件.................................................................................107 写 JPEG 文件...........................................................................................108 读取 JPEG 文件........................................................................................108 查询图像文件信息....................................................................................109 第七章 图形硬拷贝输出................................................................................................110 本章概要................................................................................................................110 选择图形硬拷贝输出设备.......................................................................................110 配置图形硬拷贝输出设备....................................................................................... 111 测定当前的设备配置....................................................................................... 111 常用的 Device命令关键字...............................................................................112 创建 PostScript 文件........................................................................................113 将图形送到硬拷贝设备中.......................................................................................113 在运行 MacOS 系统的计算机上打印 PostScript 文件.........................................115 在 Windows 计算机上打印PostScript 文件........................................................115 生成封装的 PostScript 文件输出..............................................................................116 封装 PostScript 图形的预览..............................................................................116 生成彩色的 PostScript 输出..............................................................................116 PostScript 中的彩色图像与灰度图像........................................................................117 真彩图像.........................................................................................................117 在 PostScript 设备上创建高质量的输出...................................................................118 显示设备和 PostScript 设备之间的相同点.........................................................118 第八章 IDL 编程基础....................................................................................................129 本章概述................................................................................................................129 编写 IDL 批处理文件..............................................................................................129 编写 IDL程序.....................................................................................................130 编写 IDL 过程........................................................................................................131 过程和与函数中变量的作用范围......................................................................132 6 创建位置参数..................................................................................................132 定义可选的或必须的位置参数.........................................................................133 定义关键字.....................................................................................................134 使用缩写关键字..............................................................................................134 定义可选择的关键字.......................................................................................135 处理具有双重属性的关键字.............................................................................136 创建输出型参数..............................................................................................137 用引用和传值的方法传递信息.........................................................................137 参数存在吗.....................................................................................................139 编写 IDL 函数........................................................................................................140 方括号和函数的调用.......................................................................................142 用 Forward_Function 命令保留函数名...............................................................142 使用程序控制语句...........................................................................................142 IDL 中表达式的真和假....................................................................................142 将多个语句处理成单个语句.............................................................................143 If…Then…Else 控制语句.................................................................................144 FOR 循环控制语句..........................................................................................145 WHILE 循环控制语句 .....................................................................................145 REPEAT...UNTIL 循环控制语句......................................................................146 CASE控制语句...............................................................................................146 GOTO控制语句..............................................................................................147 错误处理控制语句...........................................................................................147 ON_Error 控制语句.........................................................................................147 Catch 控制语句...............................................................................................148 错误处理语句的优先级....................................................................................149 编译和执行 IDL 程序模块................................................................................149 程序编译规则...........................................................................................150 程序编译和自动运行规则.........................................................................150 特殊编译命令...........................................................................................150 用打印设备定位图形.......................................................................................151 用打印设备输出图像.......................................................................................152 第九章 编写 IDL 程序.................................................................................................153 本章概述................................................................................................................153 基本的 ImageBar 程序.............................................................................................153 向 ImageBar 程序增加颜色敏感功能.................................................................156 给 ImageBar 中的命令传递关键字....................................................................158 使用关键字继承.......................................................................................158 根据窗口大小改变字符大小.............................................................................160 程序 ImageBar 的最终代码...............................................................................161 在图形用户界面中包装 ImageBar .....................................................................162 第十章 编写简单的组件程序.........................................................................................163 本章概述................................................................................................................163 组件程序的结构.....................................................................................................163 组件程序如何对事件作出反应.........................................................................164 7 编写组件定义模块...........................................................................................164 定义和创建程序组件.......................................................................................165 创建顶层 base组件..........................................................................................165 创建菜单栏按钮..............................................................................................166 为程序创建图形窗口.......................................................................................166 在屏幕上实现组件....................................................................................166 使绘图组件成为当前图形窗口..................................................................167 在绘图组件窗口上显示图形......................................................................167 保存程序运行时所需要的信息.........................................................................167 使用组件用户值保存程序信息..................................................................168 创建事件循环和注册程序.........................................................................168 运行程序.........................................................................................................168 创建无阻塞组件程序................................................................................169 第十一章 组件编程技巧................................................................................................175 本章概述................................................................................................................175 改变颜色表............................................................................................................176 保护公共块............................................................................................................176 一个可选择颜色表的工具.......................................................................................177 一个关键字继承的问题...........................................................................................177 给组件程序增加 Group Leader.................................................................................180 在 24 位显示器上改变颜色表..................................................................................181 创建事件并将事件传递给其它程序.........................................................................181 在组件程序中使用指针...........................................................................................183 使用 Cleanup 过程防止内存泄露.............................................................................185 使用伪事件进行程序通信.......................................................................................186 创建一个具有“ 记忆功能” 的程序.............................................................................187 保护组件程序的颜色..............................................................................................189 通过组件跟踪事件来保护颜色................................................................................190 通过绘图组件事件来保护颜色................................................................................191 保存或者发布程序的图形.......................................................................................192 第十二章 对话框程序...................................................................................................195 本章概述................................................................................................................195 创建模式对话框.....................................................................................................195 阻塞的组件程序..............................................................................................195 模式组件程序..................................................................................................196 编写模式对话框的定义模块.............................................................................196 定义一个顶级的模式 base.........................................................................197 定义其他组件...........................................................................................198 在模式对话框中保存信息.........................................................................198 创建 Info 结构..........................................................................................199 创建一个阻塞组件....................................................................................199 从阻塞中返回...........................................................................................199 编写模式对话框的事件处理模块......................................................................200 测试模式对话框程序.......................................................................................201 8 创建非模式的对话框..............................................................................................201 编写非模式对话框程序....................................................................................202 通报程序事件的组件.......................................................................................203 编写非模式对话框的事件处理模块..................................................................204 将事件发送给其他组件.............................................................................204 测试非模态对话程序.......................................................................................205 附录 A 组件的事件结构................................................................................................206 事件结构的定义.....................................................................................................206 公共字段的定义.....................................................................................................206 基本组件的事件结构..............................................................................................207 base组件.........................................................................................................207 按钮组件.........................................................................................................207 绘图组件.........................................................................................................207 下拉式列表组件..............................................................................................207 标签组件.........................................................................................................208 列表组件.........................................................................................................208 滑动条组件.....................................................................................................208 表单组件.........................................................................................................208 插入单个字符事件....................................................................................208 插入字符串事件.......................................................................................208 删除字符串事件.......................................................................................208 选择文本事件...........................................................................................209 选择单元事件...........................................................................................209 改变行高事件...........................................................................................209 改变列宽事件...........................................................................................209 无效数据事件...........................................................................................209 文本组件.........................................................................................................210 插入字符事件...........................................................................................210 插入字符串事件.......................................................................................210 删除字符串事件.......................................................................................210 文本选择事件...........................................................................................210 复合组件的事件结构................................................................................210 组件程序的事件结构................................................................................211 其他组件的事件结构................................................................................212

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值