Xander Bakker and Dan Patterson , Kindly your cooperation is highly appreciate.
I have two raster file, i want to perform Scatter plot of those raster . I found one code that is written by Dan Patterson
Below code
<SPAN class="keyword token">from</SPAN> matplotlib <SPAN class="keyword token">import</SPAN> pyplot <SPAN class="keyword token">as</SPAN> plt
xs <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">3</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">2</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">5</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">6</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">4</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="comment token"># Which fomart of data i have to give here?</SPAN>
ys <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="number token">3</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">2</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">5</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">3</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">2</SPAN><SPAN class="punctuation token">]</SPAN>
plt<SPAN class="punctuation token">.</SPAN>scatter<SPAN class="punctuation token">(</SPAN>xs<SPAN class="punctuation token">,</SPAN> ys<SPAN class="punctuation token">)</SPAN>
main_title <SPAN class="operator token">=</SPAN><SPAN class="string token">"My first graph"</SPAN>
plt<SPAN class="punctuation token">.</SPAN>title<SPAN class="punctuation token">(</SPAN>main_title<SPAN class="punctuation token">,</SPAN> loc<SPAN class="operator token">=</SPAN><SPAN class="string token">'center'</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token">#loc is either left, right or center</SPAN>
plt<SPAN class="punctuation token">.</SPAN>minorticks_on<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
plt<SPAN class="punctuation token">.</SPAN>tick_params<SPAN class="punctuation token">(</SPAN>which<SPAN class="operator token">=</SPAN><SPAN class="string token">'major'</SPAN><SPAN class="punctuation token">,</SPAN> direction<SPAN class="operator token">=</SPAN><SPAN class="string token">'in'</SPAN><SPAN class="punctuation token">,</SPAN> length<SPAN class="operator token">=</SPAN><SPAN class="number token">6</SPAN><SPAN class="punctuation token">,</SPAN> width<SPAN class="operator token">=</SPAN><SPAN class="number token">2</SPAN><SPAN class="punctuation token">)</SPAN>
plt<SPAN class="punctuation token">.</SPAN>tick_params<SPAN class="punctuation token">(</SPAN>which<SPAN class="operator token">=</SPAN><SPAN class="string token">'minor'</SPAN><SPAN class="punctuation token">,</SPAN> direction<SPAN class="operator token">=</SPAN><SPAN class="string token">'in'</SPAN><SPAN class="punctuation token">,</SPAN> length<SPAN class="operator token">=</SPAN><SPAN class="number token">4</SPAN><SPAN class="punctuation token">,</SPAN> width<SPAN class="operator token">=</SPAN><SPAN class="number token">2</SPAN><SPAN class="punctuation token">)</SPAN>
plt<SPAN class="punctuation token">.</SPAN>show<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Earlier Dan suggest to someone convert those raster to arrays. I followed the same but could not solve it. How to process tiff to array.
how do i execute two raster in X and Y axis. I have tiff images.
Branched from Perform Raster Calculation from Multiple Sub-folder Using ArcPy