使用什么绘图软件:具有唯一数据的2D极坐标图 [英] What plotting software to use: 2D polar plot with unique data

查看:457
本文介绍了使用什么绘图软件:具有唯一数据的2D极坐标图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下格式的数据(示例):

  R_min R_maxθ_minθ_min区域

0 260 0 1.57 114
260 270 0 1.57 106
270 320 0 1.57 107


$ b b

可以看到,我有从R_min到R_max创建的从theta_min到theta_max的区域(区域)。每行数据代表一个区域,我想根据区域号用相应的颜色绘制。在这个简单的情况下,上面显示的数据如下图所示:





我应该使用什么绘图软件来完成这项工作?选项:




  • MATLAB。我无法找到我需要的,但发现的功能,如。


  • 在Unix系统上,排序也可以使用eg来实现

      plot'< sort -r test.txt'... 



I have my (example) data in the following format:

R_min  R_max   θ_min   θ_min   Zones

0   260 0   1.57    114
260 270 0   1.57    106
270 320 0   1.57    107

As you can see, I have "zones" (areas) that are created from R_min to R_max that sweep from theta_min to theta_max. Each row of data represents an area that I want to plot with a corresponding color based on the zone number. In this simple case, the data I show above would look like the following picture:

What plotting software should I use to accomplish this? I have been investigating the following options:

Are there other programs or a better way to compile my data to make my task-at-hand doable?

My real data set has thousands of rows of data and not nearly as simple as a quarter circle rainbow.

解决方案

Here is one possible solution with gnuplot. That uses the circles plotting style to draw the overlapping wedges at the origin with a specified radius. That requires you to have your data sorted by descending maximum radius, and that you have no gaps.

Here is a possible script:

set xrange [0:350]
set yrange [0:350]

set size ratio -1
set style fill solid noborder
set palette defined (106 'blue', 107 'yellow', 114 'magenta')
set cbrange [106:114]
unset colorbox
plot 'test.txt' using (0):(0):2:($3*180/pi):($4*180/pi):5 with circles linecolor palette notitle

with the result (with 4.6.4):

Some more remarks:

  • The radius of the circles is given in units of the x-axis, but the y-axis isn't adapted accordingly. That's why you must set both xrange, yrange and even the ratio of the two axes with set size ratio -1.

  • Using the palette for coloring is one option, other options like using linecolor variable or linecolor rgb variable, are explained e.g. in gnuplot candlestick red and green fill.

  • On Unix systems, the sorting could also be done on-the-fly with e.g.

    plot '< sort -r test.txt' ...
    

这篇关于使用什么绘图软件:具有唯一数据的2D极坐标图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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