""" ----------------------------------------------------------------- JMA_Mag_type1.py This program is brought by modifying the following script. M=log(A)+1.73*log(D)-0.83 I thank to the following script's authour. 2nd.Mar.2013 Copyright (C) 2013 Yoshio Okamoto ----------------------------------------------------------------- ex_dubois.py Body Surface Area (BSA) according to Du Bois & Du Bois, Arch Intern Med 1916;17:863: Body Surface Area = 0.007184* (Weight(kg)**0.425)*(Height(cm)**0.725) Copyright (C) 2007-2009 Leif Roschier This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . """ from pynomo.nomographer import * Mag_params={ 'u_min':2.0, 'u_max':7.0, 'function':lambda u:-u, 'title':r'$Magnitude[JMA]$', 'tick_levels':4, 'tick_side':'left', 'tick_text_levels':4, 'scale_type':'linear smart', 'axis_color':color.cmyk.Magenta, 'text_color':color.cmyk.Magenta, 'title_color':color.cmyk.Magenta, } Amp_params={ 'tag':'Amp.[mm]', 'u_min':10.0, 'u_max':500.0, 'function':lambda u:log10(u), 'title':r'$Amp.[\mu m]$', 'tick_levels':4, 'tick_text_levels':4, 'scale_type':'log smart', 'title_x_shift':1.0, 'axis_color':color.cmyk.Emerald, 'text_color':color.cmyk.Emerald, 'title_color':color.cmyk.Emerald, } D_params={ 'tag':'PS-time', 'u_min':10.0, 'u_max':1200.0, 'function':lambda u:1.73*log10(u)-0.83, 'title':r'$D[km]$', 'tick_levels':4, 'tick_text_levels':4, 'tick_side':'left', 'title_x_shift':-0.8, 'scale_type':'log', 'axis_color':color.cmyk.Emerald, 'text_color':color.cmyk.Emerald, 'title_color':color.cmyk.Emerald, } block_1_params={ 'block_type':'type_1', 'width':15.0, 'height':25.0, 'f1_params':Amp_params, 'f2_params':Mag_params, 'f3_params':D_params, } Amp59_params={ 'tag':'Amp.[mm]', 'u_min':10.0/10.0, 'u_max':500.0/10.0, 'function':lambda u:log(u/10.0), 'title':r'$59\_type[mm]$', 'tick_levels':4, 'align_func':lambda u:u*10.0, 'tick_text_levels':4, 'tick_side':'left', 'scale_type':'log smart', 'title_x_shift':-1.0, } block_2_params={ 'block_type':'type_8', 'f_params':Amp59_params, } PS_time_params={ 'tag':'PS-time', 'u_min':10.0/8.75, 'u_max':1200.0/8.75, 'function':lambda u:1.73*log10(u/8.75)-0.83, 'title':r'$PStime[sec]$', 'tick_levels':4, 'align_func':lambda u:u*8.75, 'tick_text_levels':4, 'tick_side':'right', 'scale_type':'log smart', 'title_x_shift':1.2, } block_3_params={ 'block_type':'type_8', 'f_params':PS_time_params, } main_params={ 'filename':'JMA_Mag_type2_875_v5.pdf', 'paper_height':25.0, 'paper_width':15.0, 'block_params':[block_1_params,block_2_params,block_3_params], 'transformations':[('rotate',0.01),('polygon',),('scale paper',)], 'title_str':r'\bf\large$M=log(A)+1.73*log(D)-0.83, \quad D=8.75*T$ \tiny Python script by Y.Okamoto 22th June 2015', 'title_x': 7.5, 'title_y': 25.1, 'title_box_width': 9 } Nomographer(main_params)