scaled image of plot

4 次查看(过去 30 天)
George Valdes
George Valdes 2015-5-20
编辑: Thorsten 2015-5-20
I've created a very large image of a time series data set [~300,000 x 75] pixels. Below that image I would like to create and append a time series signal component (an x,y-type plot) in the form of an image with time axis labels. Is it possible to create a figure to this exact same scale (the dataset is the same dimension), then convert it into an image that I may combine similarly to [img1;img2]?

回答(1 个)

Thorsten
Thorsten 2015-5-20
I think the result would look awkward, (300000 x 75 is quite an extreme format). But you can do it: 1. plot the graph, 2. save the figure using print -dpng, 3. read the png file, 4. resize it using imresize and finally 5. concatenate the two images [img1; img2].
  2 个评论
George Valdes
George Valdes 2015-5-20
The awkwardly plotted image is actually quite captivating for this data type. the alternative is having to break the data into roughly 270 separate images vs. a single scrolling png. Its just that the software limitations on figure dimensions make it a little difficult to work around. mathworks could solve this application with just a scrollbar.
when plotting the data as you've recommended it compresses the data to fit on screen so the signal information is lost when saving the image. Is there a coded version of figure generation that doesn't compress the data, similar in function to the imwrite() method that I use for the full scale images?
Thorsten
Thorsten 2015-5-20
编辑:Thorsten 2015-5-20
I do not know of such a function. But you could do your plot my allocating a large matrix of ones and then setting for each x the corresponding y value in the matrix to 0. Of course you have to map the range of y to some the choosen height of the matrix.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by