COMPGROUPS.NET | Post | Groups | Users | Stream | Browse | About | |

### draw horizontal line on heatmap

• Email
• Follow

Hi,

I'm trying to draw horizontal line on a heatmap. Tried the following but it didn't work:
ho = HeatMap(data);
plot(ho)
hold on
plot([28 28],[-10,300],'r');

Any idea?

 0

See related articles to this posting

On 2/24/2011 10:57 AM, C T wrote:
> Hi,
>
> I'm trying to draw horizontal line on a heatmap. Tried the following but
> it didn't work:
> ho = HeatMap(data);
> plot(ho)
> hold on
> plot([28 28],[-10,300],'r');
>
> Any idea?

Yeah, your x vector is a constant.  That would be a vertical line, not
horizontal.  W/O knowing the ranges of ho can't tell whether the values
chosen are appropriate or not.

--


 0

On Feb 24, 11:57=A0am, "C T" <u...@doramail.com> wrote:
> Hi,
>
> I'm trying to draw horizontal line on a heatmap. Tried the following but =
it didn't work:
> ho =3D HeatMap(data);
> plot(ho)
> hold on
> plot([28 28],[-10,300],'r');
>
> Any idea?

--------------------------
Is ho a 2D image?  Or a 1D array of y values?
You can also use line() instead of plot().
I think like this (untested):
xlimits =3D xlim;
line([xlimits(1) xlimits(2)], [yValue yValue]);
where yValue is the y value where you want the horizontal line placed.

 0

"C T" <usro@doramail.com> wrote in message <ik62l1$jva$1@fred.mathworks.com>...
> Hi,
>
> I'm trying to draw horizontal line on a heatmap. Tried the following but it didn't work:
> ho = HeatMap(data);
> plot(ho)
> hold on
> plot([28 28],[-10,300],'r');
>
> Any idea?

For horizontal lines (with a constant y-value!) you can use REFLINE

h = refline(0, 28) ;
set(h,'color','r','linewidth',5)

~ Jos

 0

On Feb 25, 4:20=A0am, "Jos (10584) " <#10...@fileexchange.com> wrote:
> For horizontal lines (with a constant y-value!) you can use REFLINE
>
> h =3D refline(0, 28) ;
> set(h,'color','r','linewidth',5)
>
> ~ Jos
---------------------------------------------------------------------------=
----
Sounds convenient, but I don't have it.  What toolbox is it in?

 0

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <8965467a-fa41-4fa2-b6de-15cc1b66579d@z3g2000prz.googlegroups.com>...
> On Feb 25, 4:20 am, "Jos (10584) " <#10...@fileexchange.com> wrote:
> > For horizontal lines (with a constant y-value!) you can use REFLINE
> >
> > h = refline(0, 28) ;
> > set(h,'color','r','linewidth',5)
> >
> > ~ Jos
> -------------------------------------------------------------------------------
> Sounds convenient, but I don't have it.  What toolbox is it in?

REFLINE is a function the statistics toolbox, but it is basically nothing more than

line(get(gca,'xlim'), [Y Y],'b-') ;

~ Jos

 0
Reply 10584 (932) 2/25/2011 2:06:05 PM

Ok. First of all thank you for all your replies. But I probably didn't convey my question correctly.

I cannot find a way to draw a line on top of a heatmap. Any line.
Using the usual hold on doesn't work.

 0
Reply usro (18) 2/25/2011 4:04:05 PM

On Feb 25, 11:04=A0am, "C T" <u...@doramail.com> wrote:
> Ok. First of all thank you for all your replies. But I probably didn't co=
nvey my question correctly.
>
> I cannot find a way to draw a line on top of a heatmap. Any line.
> Using the usual hold on doesn't work.

------------------------------------------------------------------
OK, go ahead.  What are you waiting for? Convey your question as
correctly, completely, and explicitly as you can.  This may include
hosting web site.

 0
Reply imageanalyst (7623) 2/25/2011 4:06:52 PM

data = gallery('invhess',20);
hmo = HeatMap(data)
plot(hmo);
hold on;
plot([5 5],[1 20],'k','linewidth',5);

The line is not on the heatmap!

I simply want a line imposed on a heatmap!

 0
Reply usro (18) 2/25/2011 4:17:19 PM

Sorry I can't run it because I don't have the HeatMap() function.
What toolbox is it in?  Or did you write it yourself?

If I do this, it certainly does draw a line:

data = gallery('invhess',20);
image(data);
hold on;
plot([5 5],[1 20],'k','linewidth',5);

 0

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <7d23e64d-1db5-41f5-b54a-625e81b5e61c@8g2000prb.googlegroups.com>...
> Sorry I can't run it because I don't have the HeatMap() function.
> What toolbox is it in?  Or did you write it yourself?
>
> If I do this, it certainly does draw a line:
>
> data = gallery('invhess',20);
> image(data);
> hold on;
> plot([5 5],[1 20],'k','linewidth',5);

It's bioinformatics toolbox.
I know it works on image. But I just can't draw a line on top of heatmap.

 0
 comp.soft-sys.matlab 205710 articles. 556 followers.

10 Replies
520 Views

Similar Articles

[PageSpeed] 0

• Email
• Follow

Similar Artilces:

Draw an one inch horizontal line?
It is kind of a silly question. But I cannot find a ruler in the office and I want to know how long is one inch. Since I have matlab and image processing toolbx, I think about just drawing a horizontal line in a figure window. But how would one draw a horizontal line (one inch long) in a figure window. I would like this to work regardless of the resolution or physical size of the computer screen. Thanks. "Kevin " <kevin@northpole.com> wrote in message <hmrjgc$l34$1@fred.mathworks.com>... > It is kind of a silly question. But I cannot find a ruler in the off...

My attempt at linear regression just draws a horizontal line :-(
Hi, I'm trying to draw a simple "best fit" line through some data. But the resulting graph has the "fit" being a horizontal line, which is wrong since when I change the data the horizontal line remains. Is there anyone smart enough to figure this out? Data: 2005 164774 2006 253829 2007 346079 2008 411452 2009 402088 2010 456426 2012 534231 2013 628282 Script: set terminal postscript set output "chart.ps" set xrange [2005:2040] set yrange [0:2000000] set xtics 10 set ytics 500000 f(x)=m*x+c fit f(x) "data" ...

Wacom tablet only draws vertical and horizontal lines near edge of canvas
I'm using Photoshop 7 and a Graphire 3 that I just got. When I try to draw a curvy line it draws how I want until I get to the edge of the canvas, then it turns horizontal for a couple of pixels then draws parallel to the edge at the edge. It's really annoying. Is there some option or something I need to uncheck? in article LGyyc.6099X92.91@bignews6.bellsouth.net, fredrickson at no@spam.com wrote on 06/12/2004 12:38 AM: > I'm using Photoshop 7 and a Graphire 3 that I just got. When I try to draw a > curvy line it draws how I want until I get to the edge of the canvas, th... Re: How to draw horizontal black line with 2 pixel width in PSP 9, Davidl1 wrote: > Fred Hiltz wrote: [snip] >>> What I must do to draw 2 pixel line? >>> In PSP 7 I draw it very well! >> >> It is a defect introduced in PSP 8, known to Jasc and to Corel >> but deemed not worth correcting. I keep PSP 7 around just to do >> vector operations because of that and the hard-to-see node >> editing handles in the later releases. >> > 8 is OK here. Keep trying. The defect is easiest to see with narrow horizontal and vertical lines, anti-alias off, and "Snap to center of pixel" off in Preferences >... Re: How to draw horizontal black line with 2 pixel width in PSP 9, Davidl1 wrote: > Fred Hiltz wrote: [snip] >>> What I must do to draw 2 pixel line? >>> In PSP 7 I draw it very well! >> >> It is a defect introduced in PSP 8, known to Jasc and to Corel >> but deemed not worth correcting. I keep PSP 7 around just to do >> vector operations because of that and the hard-to-see node >> editing handles in the later releases. >> > 8 is OK here. Keep trying. The defect is easiest to see with narrow horizontal and vertical lines, anti-alias off, and "Snap to center of pixel" off in Preferences >... using line to draw a straight line Dear Friends, I use the line command to draw a straigh line on x-y axis. For example the following command will plot a straight line that has min_vale and max_value: line([min_value max_value],[1 1],'Color','r','LineWidth',2); if min_value =200 and max_value=400 then the line will look like: : : : ________ :___________________ 200 400 My question is how can I have the max and min value showed on the line itslef so that my plot will look like: : : : 200________400 :___________________ 200 400 Thanks you'll have to use either annotation('t... Hidden LInes in Drawings/Line weight Is there a way once I have the drawing open, and I change the option System Options/Drawings/Display Style/ hidden lines to hidden lines "on", that the current view in the drawing are updated immediately? I seem to have to delete the old view and THEN put in a new view to get the hidden line to show. The solid line always look so bold when I look at the drawing, is there a line thinkness adjustment? I much appreciate any help. Thanks It's in the file/print dialog box. I believe it sets the line weights for all drawings currently open. I can't recall whether it's the... Drawing patches and lines I am trying to build up a (2d) colour image out of red, green and blue patches of varying intensities. So for example, when three patches of full intensity red, green and blue are overlaid I will get white. Does anyone know how to do this? Thanks! On Apr 8, 4:40=A0pm, "Peter " <peter.m...@gmail.com> wrote: > I am trying to build up a (2d) colour image out of red, green and blue pa= tches of varying intensities. So for example, when three patches of full in= tensity red, green and blue are overlaid I will get white. > > Does anyone know how to do this? > > Than... draw a line vertical to another line How to draw a line which is vertical to another line defined by two given points and gets through the middle points of those two given points? Homework question? Do you mean perpendicular? Bas Hi, a tip : help line <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/line.html> J�r�me J�r�me wrote: > > > Hi, > > a tip : > > help line > <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/line.html> > > J�r�me Another tip: <http://mathworld.wolfram.com/PerpendicularBisector.html> ... drawing a parallel line to another line What is the quickest way to draw a line parallel to another line that are an (aligned) distance apart? The lines are not hor. or vert. I was able to do it using a circle and offset twice, which created an extra line that I deleted. Is there a quicker way? OK, nevermind. I see my mistake. I just do offset once and it does the aligned distance. You can also use the parallel Object snap by setting the parallet snap to on, or by clicking the parallel icon on the object snap tool bar. Practice this a few times and it becomes second nature. PB In article <1128920307.708932.3... hitesting a line and some line drawing technique. Greetings What is the best way to hittest a (x,y) in a line i.e. whether (x,y) lies in the coordinates of the line. In rectangle you could you .Inside method, but for line its very difficult... Also...has anybody drawn a beveld line like the connector in MS SQL Server diagrams. Those line has some pipe type appearance...looks good?? any ideas on how to do that... Thanks in advance. Karam __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only29.95 per month! http://sbc.yahoo.com -----------------------------------------------------------------...

Drawing lines in figures using line command
I am using the line command to draw a pyramid in a figure. I have succeed in drawing the base rectangle, but when idraw the lines from the top to the base corners with a different set of input vectors the base draw (other lines) dissapears. for the base i am using 4 commands like: x=linspace(Xbase(:,1),Xbase(:,2),N)'; y=linspace(Ybase(:,1),Ybase(:,2),N)'; b1=line(x,Ybase(:,1),Z(:,1),'LineStyle','- ','LineWidth',3,'Color','black'); Xbase,Ybase.... are 1X2 vectors contaning lower and upper limit. for the diagonal lines i am using: N=100; x=lins...

Horizontal line below text line in a scanned document
I am trying to draw horizontal lines on an existing scanned text document(scanned as.jpg file) to facilitate segmentation of text lines. The horizontal line needs to come below the text line as shown below. example : The sun rises in the east _____________________ Any hints on the matlab commands to do this function would be useful to me. Thanks in advance. anjali kadakol Figure out the line number, then do imageArray(lineNumber, :) = 0; Maybe you can collapse the page horizontally verticalProfile = sum(imageArray, 2); % Collapse along columns and then threshold [...

Macro for converting every line in a drawing into two lines
Hi all, I am completely new to the whole Solidworks macro thing. I was wondering if something like the following could be done: 1. Scan through the present drawing and for every line in the drawing: 2. Create two copies of the line which are offset from the present line on both sides. Basically, we have a drawing which cuts out fine on a machine which creates "thick cuts", however, when we want to cut out the same file on another machine which creates "thin cuts", some of the cuts are too thin. I thought that doing something like this would enable me to thicken the cuts ...

How to draw an reference line or scout line on dicom image ?
I am looking for a good guide or steps involved to calculate the co-ordinate and draw the reference line on dicom image . Any good things ... ...

draw lines
Hi guys >> img = imread('test.jpg'); >> img = rgb2gray(img); >>figure; >> imshow(img, []); >> line([20 65], [80 93], 'color', 'white'); I use the above code to draw a line on an image. Now, I want to get every pixel's position, which has white color, in the original image. How to do this? Thanks in advanced.. Actually, the problem is how to get the image data with line. "zhang " <xiaoc10@gmail.com> wrote in message <hi1b4d$7tk$1@fred.mathworks.com>... > Hi guys > > >> img = im...

Drawing lines
I want to draw a line chart with PHP. If I make my Draw() function the only function call, it works fine. But if I display other data, and then call my Draw() function, I get a bunch of graphics characters, and some text. The text says I have already defined the header info. Here is the ledgible part of the text Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site8/fst/var/www/html/laps/laps.php:10) in /home/virtual/site8/fst/var/www/html/laps/lib.php on line 498 Here is my Draw() function. I just cut and pasted some code off a websit...

Drawing lines
If this is not the right forum for this, please forgive me. I am a long time programmer, but have never really gotten into graphics development (and am a recent convert from Windows to Mac, if that matters). I need to develop some programs that will draw lines from point A to point B (as on a map). I can handle the logic for the programming and will be using XCode (which I am also new in), programming in C++ (which I am just getting back into after years of not using it). I'm not sure which kind of Project in XCode will lend itself to what I need to do (i.e Cocoa, one...

Draw line?
Hello all, I need to draw a line in a document, with caps at the ends: |----------------------------------| I need the line to centered and, and need it to be exactly 15cm long. I've learnt one thing about (La)TeX: You can do everything, but the question is just _how_? -- Kind Regards, Jan Danielsson Te audire non possum. Musa sapientum fixa est in aure. Hmmm, 15 centimeters? How about 15 millimeters? I can do that (or at least come really close). Use three rule boxes, one for each end, and one in the middle. \documentclass[oneside]{report} \begin{document} \beg...

line drawing?
Hi everyone, I'm looking for a way to draw a line that will zig-zag its way thru an image randomly, crisscrossing itself many times, based on random numbers _and_ php. To give you an idea of what I'd like to do, here's a link to a gif : http://www.chaosmos.net/chaosmoseng/chaosmos7.htm I've spent a lot of time googling about how to draw that kind of line with php but I only came across how to draw texts, charts and pies. Is there a way to do that or am I barking up the wrong tree? Thanks for your answers marko marko wrote: > Hi everyone, > I'm looking for a w...

Horizontal line
How do I draw a single horizontal line the width of the text below a title at the top of a page? -- Edward A. Johnson Calle San Agustin, 19 04638 Moj�car (Almer�a) SPAIN Voice: (34) 950 47 51 16 Fax: (34) 950 47 87 43 Mobile: (34) 662 227 670 rule \rule[raise-height]{width}{thickness} The \rule command is used to produce horizontal lines. The arguments are defined as follows: a.. raise-height - specifies how high to raise the rule (optional) b.. width - specifies the length of the rule (mandatory) c.. thickness - specifies the thickness of the rule (mandatory) \hrulefill T...

Drawing a line
Hello, I am searching an algorithm to generate a line between 2 points, on a screen. The line should have a 4 pixel connexity. Thank you, Christophe, Christophe Jacquelin <cjacquel@club-internet.fr> wrote: > I am searching an algorithm to generate a line between 2 points, on a > screen. The line should have a 4 pixel connexity. The classic Bresenham algorithm can easily be changed to do this, once you've understood how it works. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain. "Christophe Jacquelin&qu...

Draw Lines
Hello everyone .. Can any of you please tell me how to draw lines joining two points in a page using PHP. Not on an image but on the page itself?? And the lines also need to be at an angle to the horizontal. Thanks, Vaddina Prakash Rao Vaddina, PHP doesn't actually do any drawing (unless you're using it to generate an image), but some DHTML mixed with PHP might get you where you want to be. I just did a quick look on google ( http://www.google.com/search?hl=en&q=dhtml+draw+diagonal+line&spell=1 ) but the first three items that I checked seem to talk about using images. It...

draw a line ??
I have problem to draw a line in matlab.. my function read some X and Y and the movement data of X and Y . In my plot I have 5 points with 5 ellipse... and the point is that I want to draw a line from center of ellipse to another point (x,Y) . after I use plot or line to draw a line nothing appears in my results. axesm mercator for i = 1 : length(Xx) ecc = axes2ecc(Semia(i),Semib(i)); plotm(Xx(i)/1998,Yy(i)/1998,'r+'); % I used 1998 for scaling my X and Y [elat,elon] = ellipse1(Xx(i)/1998,Yy(i)/1998,[Semia(i) ecc],ttt(i)); plotm(elat,elon); end % draw m...