[pstricks] Drawing Weather Maps/Reports (anything about weather?)
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Tue Mar 28 19:33:57 CEST 2017
Am 26.03.2017 um 23:49 schrieb TeXnicer:
> Questions:
> - Is there any packages, pst-packages dealing with this kind of science?
> Weatherreport, Symbols, e.g.?
There is no such package. However, here is an example
how you can write a new package:
\documentclass{minimal}
\usepackage{pstricks}
\makeatletter
\define at key[psset]{}{WeatherSymbol}[]{\def\psk at WeatherSymbol{#1}}
\psset{WeatherSymbol=xyz}
\define at choicekey[psset]{}{WeatherSymbol}[\val\pst at WSymbol]{xyz,abc}[xyz]{}
\psset{WeatherSymbol=xyz}%
\def\psWeather{\pst at object{psWeather}}
\def\psWeather at i(#1)#2#3{%
\pst at killglue
\begingroup
\addbefore at par{gangle=-135}
\use at par
\ifcase\pst at WSymbol % nr 0->xyz
\rput{\psk at gangle}(#1){%
\psline(0,.2)(0,1.2)
\psline(0,1.2)(0.5,1.2)
\psline(0,1.1)(0.5,1.1)
\psline(0,1.0)(0.25,1.0)
\pscircle(0,0){.2}}
\rput(#1){%
\rput[r](-1.3,0){$\mathsf{#2}$}
\rput[l](1.3,0){$\mathsf{#3}$}}
\or % nr 1 -> abc
\fi
\endgroup
}
\makeatother
\begin{document}
\centering
WX: SE~5, misty, 5$^\circ$, 1008\,hPa\par
\begin{pspicture}(-3,-5)(3,2)
\psWeather(0,0){5}{1008}
\psWeather[gangle=-90,linecolor=red](0,-2){5}{1008}
\end{pspicture}
\end{document}
Herbert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto vom 2017-03-28 19-30-46.png
Type: image/png
Size: 9676 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20170328/b21cb622/attachment.png>
More information about the PSTricks
mailing list