English 中文(简体)
在MATLAB中创建时间表风格
原标题:Creating a timeline style graphic in MATLAB

在MATLAB的一些数据处理工作结束时,我想建立一个显示一系列数据有色时限的地图。 我有一些进程,每个进程都采取类似步骤,在不同时间开始和停止。 理想的做法是,它最终研究类似的东西(参考ASCII艺术):

   |   ###***$$$$$$$$$$         Process 1
   |        ###***$$$$$$$       Process 2
   |           ###$$$$$         Process 3
   |             *******$$$$$$  Process 4
   +------------------------------------------
                    Time

在<代码>#*>>><$上,不同颜色的相邻区块(每一步均一色;注有些是任择的)。

标签可以是其他地方的,但每一行的标签是好的。

我用<代码>rectangle <>/code>和text共同提出了一个解决办法,但似乎在MATLAB内部,这可能是我刚刚发现的一块地块。 你们是否知道?

最佳回答

使用<条形码>。 第1栏作为你的初始过程时间

data_with_init_time = [ 
       1, 10, 5, 3 ;
       3, 10, 3, 9 ;
       7, 10, 4, 8 ;
       12,10, 2, 2 ];

h = barh(data_with_init_time,  stack );
set(h(1),  facecolor ,  none ,  EdgeColor ,  none ); % disable the color of the first column (init time)
set(gca,  YTickLabel , { proc 1 ,  proc 2 ,  proc 3 ,  proc 4 } ); % change the y axis tick to your name of the process
axis ij; % Put the first row at top
问题回答

暂无回答




相关问题
OpenGL 3D Selection

I am trying to create a 3D robot that should perform certain actions when certain body parts are clicked. I have successfully (sort of) implemented picking in that if you click on any x-plane part, it ...

Why and when should you use hoops 3d graphics? [closed]

My company needs 3D visualization for our commercial applications (CAD, mesh manipulation, computational geometry). We are tired of true vision 3D (tv3d), which we ve been using for years (poor ...

Prerequisite for learning directx

I am from .net C# background and I want to learn DirectX. I have knowledge of C++ but I am fairly new to graphic world. I am little confused about how to start learning directx, should I start ...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Determine VRAM size on windows

I need to determine roughly how much VRAM a system s graphics card has. I know all the reasons why I shouldn t but I do. It doesn t need to be perfect (some cards lie etc.) but I need a ballpark. On ...

Mask white color out of PNG image on iPhone

I know that there are already 2 relevant posts on that, but it s not clear... So the case is this...: I have a UIImage which consists of a png file requested from a url on the net. Is it possible to ...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签