<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909</link>
    <title>MATLAB Central Newsreader - image in axes: making grid visible</title>
    <description>Feed for thread: image in axes: making grid visible</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 22 Aug 2007 00:36:02 -0400</pubDate>
      <title>image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#388671</link>
      <author> runcyclexcski@yahoo.com</author>
      <description>I display an image in an axes, and I want the grid in the axes and the&lt;br&gt;
tickmarks pointing inwards being visible, i.e. being on top of the&lt;br&gt;
image. But the image always covers up the grid and the tickmarks. Is&lt;br&gt;
there any way to avoid that? I found a workaround by displaying the&lt;br&gt;
tickmarks outward, but with the grid there is no workaround. I looked&lt;br&gt;
in this group and in help and did not find anything. Matlab 6p5, about&lt;br&gt;
to upgrade to R2007.</description>
    </item>
    <item>
      <pubDate>Wed, 22 Aug 2007 16:29:50 -0400</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#388788</link>
      <author>Gautam Vallabha</author>
      <description>In article &amp;lt;1187742962.261037.112010@m37g2000prh.googlegroups.com&amp;gt;, &lt;br&gt;
runcyclexcski@yahoo.com says...&lt;br&gt;
&amp;gt; I display an image in an axes, and I want the grid in the axes and the&lt;br&gt;
&amp;gt; tickmarks pointing inwards being visible, i.e. being on top of the&lt;br&gt;
&amp;gt; image. But the image always covers up the grid and the tickmarks. Is&lt;br&gt;
&amp;gt; there any way to avoid that? I found a workaround by displaying the&lt;br&gt;
&amp;gt; tickmarks outward, but with the grid there is no workaround. I looked&lt;br&gt;
&amp;gt; in this group and in help and did not find anything. Matlab 6p5, about&lt;br&gt;
&amp;gt; to upgrade to R2007.&lt;br&gt;
&lt;br&gt;
You can try changing the color of the grid and the axis.&lt;br&gt;
&lt;br&gt;
----------&lt;br&gt;
&amp;nbsp;load clown.mat&lt;br&gt;
&amp;nbsp;figure; &lt;br&gt;
&amp;nbsp;image(X); colormap(map)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;set(gca,'tickdir','in')&lt;br&gt;
&amp;nbsp;set(gca,'xcolor','w', 'ycolor', 'w');&lt;br&gt;
&amp;nbsp;% another way to set the color&lt;br&gt;
&amp;nbsp;set(gca,'xcolor', [1 1 0], ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'ycolor', [1 1 0]);&lt;br&gt;
----------&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
Gautam</description>
    </item>
    <item>
      <pubDate>Wed, 22 Aug 2007 19:30:35 -0400</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#388835</link>
      <author> runcyclexcski@yahoo.com</author>
      <description>&lt;br&gt;
&amp;gt; You can try changing the color of the grid and the axis.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; ----------&lt;br&gt;
&amp;gt;  load clown.mat&lt;br&gt;
&amp;gt;  figure;&lt;br&gt;
&amp;gt;  image(X); colormap(map)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;  set(gca,'tickdir','in')&lt;br&gt;
&amp;gt;  set(gca,'xcolor','w', 'ycolor', 'w');&lt;br&gt;
&amp;gt;  % another way to set the color&lt;br&gt;
&amp;gt;  set(gca,'xcolor', [1 1 0], ...&lt;br&gt;
&amp;gt;          'ycolor', [1 1 0]);&lt;br&gt;
&amp;gt; ----------&lt;br&gt;
&lt;br&gt;
Nope, it did not do anything.</description>
    </item>
    <item>
      <pubDate>Wed, 22 Aug 2007 19:37:35 -0400</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#388837</link>
      <author> runcyclexcski@yahoo.com</author>
      <description>... interestingly, it does work with the clown image. But it does not&lt;br&gt;
work with mine.&lt;br&gt;
&lt;br&gt;
I load my image like this:&lt;br&gt;
&lt;br&gt;
frame_image = image('cdata',myMatrix,'cdatamapping','scaled');</description>
    </item>
    <item>
      <pubDate>Wed, 22 Aug 2007 20:27:51 -0400</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#388842</link>
      <author>Gautam Vallabha</author>
      <description>In article &amp;lt;1187811455.531528.178200@j4g2000prf.googlegroups.com&amp;gt;, &lt;br&gt;
runcyclexcski@yahoo.com says...&lt;br&gt;
&amp;gt; ... interestingly, it does work with the clown image. But it does not&lt;br&gt;
&amp;gt; work with mine.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I load my image like this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; frame_image = image('cdata',myMatrix,'cdatamapping','scaled');&lt;br&gt;
&lt;br&gt;
Change the 'Layer' property of the axis (This puts the grid &lt;br&gt;
lines on top of the image);&lt;br&gt;
-----------&lt;br&gt;
&amp;nbsp;load clown.mat;&lt;br&gt;
&amp;nbsp;image('cdata', X, 'cdatamapping','scaled');&lt;br&gt;
&amp;nbsp;grid on; axis tight;&lt;br&gt;
&amp;nbsp;set(gca, 'layer', 'top');&lt;br&gt;
&amp;nbsp;set(gca, 'xcolor', 'w', 'ycolor', 'w');&lt;br&gt;
-----------&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
Gautam</description>
    </item>
    <item>
      <pubDate>Sat, 25 Aug 2007 03:22:45 -0400</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#389309</link>
      <author> runcyclexcski@yahoo.com</author>
      <description>Hey, Gautam, it worked, thanks a bunch!!</description>
    </item>
    <item>
      <pubDate>Sat, 31 Oct 2009 08:40:08 -0400</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#691139</link>
      <author>meha </author>
      <description>&lt;br&gt;
&amp;gt; I m converting a jpg image into binary using following code:&lt;br&gt;
g=imread('G.jpg');&lt;br&gt;
save g;&lt;br&gt;
load g;&lt;br&gt;
BW = im2bw(g,map,0.4);&lt;br&gt;
imshow(g,map), figure, imshow(BW)&lt;br&gt;
&lt;br&gt;
But in ths code, following error is coming:&lt;br&gt;
??? Undefined function or variable 'map'.&lt;br&gt;
&lt;br&gt;
How to remove this error?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Mon, 02 Nov 2009 00:18:34 -0500</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#691371</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;meha &quot; &amp;lt;sign2speech@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:hcgt58$sn9$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; I m converting a jpg image into binary using following code:&lt;br&gt;
&amp;gt; g=imread('G.jpg');&lt;br&gt;
&amp;gt; save g;&lt;br&gt;
&amp;gt; load g;&lt;br&gt;
&amp;gt; BW = im2bw(g,map,0.4);&lt;br&gt;
&amp;gt; imshow(g,map), figure, imshow(BW)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; But in ths code, following error is coming:&lt;br&gt;
&amp;gt; ??? Undefined function or variable 'map'.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; How to remove this error?&lt;br&gt;
&lt;br&gt;
Create the variable map before attempting to use it.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
comp.soft-sys.matlab (CSSM) FAQ: &lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Mon, 02 Nov 2009 03:10:26 -0500</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#691389</link>
      <author>ImageAnalyst</author>
      <description>What's the point of saving and then loading it?  You already have g so&lt;br&gt;
that is unecessary.  Your image didn't have a map, so don't use it&lt;br&gt;
subsequently because it's undefined.  Just don't use it.  Try this:&lt;br&gt;
&lt;br&gt;
clc;&lt;br&gt;
close all;&lt;br&gt;
clear all;&lt;br&gt;
workspace; % Show the Workspace panel.&lt;br&gt;
&lt;br&gt;
% Read in standard monochrome MATLAB demo image.&lt;br&gt;
grayImage = imread('coins.png');&lt;br&gt;
% Threshold it&lt;br&gt;
binaryImage = im2bw(grayImage, 0.4);&lt;br&gt;
&lt;br&gt;
% Display the original image.&lt;br&gt;
subplot(1,2,1);&lt;br&gt;
imshow(grayImage);&lt;br&gt;
title('Original gray scale image');&lt;br&gt;
&lt;br&gt;
% Display the thresholded, binary logical image.&lt;br&gt;
subplot(1,2,2);&lt;br&gt;
imshow(binaryImage, []); % Note use of [] to scale it so you can see&lt;br&gt;
it.&lt;br&gt;
title('Thresholded (binary) image');&lt;br&gt;
set(gcf, 'Position', get(0, 'ScreenSize')); % Maximize figure.</description>
    </item>
    <item>
      <pubDate>Mon, 02 Nov 2009 04:08:01 -0500</pubDate>
      <title>Re: image in axes: making grid visible</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154909#691395</link>
      <author>Make </author>
      <description>&amp;nbsp;runcyclexcski@yahoo.com wrote in message &amp;lt;1187742962.261037.112010@m37g2000prh.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; I display an image in an axes, and I want the grid in the axes and the&lt;br&gt;
&amp;gt; tickmarks pointing inwards being visible, i.e. being on top of the&lt;br&gt;
&amp;gt; image. But the image always covers up the grid and the tickmarks. Is&lt;br&gt;
&amp;gt; there any way to avoid that? I found a workaround by displaying the&lt;br&gt;
&amp;gt; tickmarks outward, but with the grid there is no workaround. I looked&lt;br&gt;
&amp;gt; in this group and in help and did not find anything. Matlab 6p5, about&lt;br&gt;
&amp;gt; to upgrade to R2007.&lt;br&gt;
&amp;gt; &lt;br&gt;
Try like this: if you display an axes in GUI,you can set the  property of axes&lt;br&gt;
which called 'visible' 'off'</description>
    </item>
  </channel>
</rss>

