Friday, September 1, 2017

Change Printers Default Single Sided Setting #mac

 Well, there is an easy way...
This prompted me to do
cupsctl WebInterface=yes
to the terminal... which enabled opening up the printer options... then I could set up the duplex printing.
Went to
Then, I had to select "Two-sided, Long-edge binding".

This enabled printing on both sides.

Friday, July 21, 2017

Plot USA m_maps

  close all
 load coastlines
states = shaperead('usastatehi',...
        'UseGeoCoords', true, 'BoundingBox', [lonlim', latlim']);
m_proj('miller','long',[-125 -67],'lat',[25 49.5]);
% m_gshhs_i('color','b');
% m_grid('box','fancy','tickdir','in');
m_coord('geographic');           % Switch to assuming geographic
% m_coast('patch',[1 1 0.99],'edgecolor','b');
  m_coast('patch',[.98 0.98 .98],'edgecolor','none');
    m_grid('box','fancy','linestyle','none','backcolor',[.8 .96 1]);
m_text(-121,38.08,  '*' ,'color','r','fontweight','bold','fontsize',24); % Tahoe
m_text(-116.8,33.03,  '*' ,'color','r','fontweight','bold','fontsize',24); % salton Sea

m_text( -77.8729,40.2547,  '*' ,'color','r','fontweight','bold','fontsize',24); % PSU
m_text( -89.9729,33.9,  '*' ,'color','r','fontweight','bold','fontsize',24); % GWN
m_text(-97.62,43.3,  '*' ,'color','r','fontweight','bold','fontsize',24); % SXF
m_text(-89.37,40.,  '*' ,'color','r','fontweight','bold','fontsize',24); % BND

for kk = 1:length(states)
m_line(states(kk).Lon,states(kk).Lat,'linewi',0.5,'color',[200 200 200]./255);

export_fig([ saveDir,  'USA_validationPoints'],'-png','-r250')

Wednesday, May 31, 2017

From Google Fusion table to Google Earth Engine!

First I made a Google Fusion table with few points with Latitue and Logitude geo-coded Names.
Then imported into fusion table

// import the fusion table
var Da = ee.FeatureCollection('ft:18RyzwhfBU0TVFa4HWFEp778Tkd9YV-X1pE_Q1hq6').geometry();

// Set center of map
Map.centerObject(Da, 6);

// show the layer
The cryptic code in the FeatureCollection is the ID of the fusion table.

See an example here

Tuesday, September 13, 2016

Insert degree symbol in MS word

Note to self:
  1. Press and hold "Ctrl"
  2. Press and hold "Shift"
  3. Press "@"
  4. Release "Ctrl", "Shift"
  5. Press "Space Bar"

Wednesday, July 13, 2016

installing #altair #python #conda

>conda install altair --channel conda-forge

The following packages will be downloaded:

    package                    |            build
    conda-4.1.8                |           py35_0         247 KB
    pandas-0.18.1              |      np110py35_0         6.9 MB  conda-forge
    vega-0.4.1                 |           py35_1         904 KB  conda-forge
    altair-1.0.0               |           py35_0         1.6 MB  conda-forge
                                           Total:         9.6 MB
Linking packages ...
[vega                ]|#########################                         |  50%
C:\Users\Userme>"C:\Users\Userme\AppData\Local\Continuum\Anaconda3\Scripts\jupyter-nbextension.exe" install vega --py --sys-prefix   && if errorlevel 1 exit 1

Just for my note
    To initialize this nbextension in the browser every time the notebook (or other app) loads:

          jupyter nbextension enable vega --py --sys-prefix

The documentation:

Tuesday, June 28, 2016

Create Clickable imagesc for 2D data

Looking at the figure is fun, specially if you can click and get the values. So, created this little function which can give you title and data tips @cursor location.
function imagesca(x, titlewant)
h = figure;
catch ME
datacursormode on