that will end up on my dissertation.
I always knew a dissertation was hard. I didn't realize it would require animal sacrifice in this day and age.
They need a "leather-bound" copy.
Precisely.
What the hell?!
Showing posts with label dissertation. Show all posts
Showing posts with label dissertation. Show all posts
Aug 6, 2012
Mar 12, 2012
Creating a colorbrewer palette for libreoffice
I am trying to draw a timeline of reproductive events in a woman's life for my dissertation. Turns out there are two so-so tools for this chore. The online tool is at lucidchart.com but the more accessible offline tool is... don't hold your breath. Libreoffice draw. (Btw, I have decided NEVER ever to draw with Libreoffice again. It is MOST painful to allign objects, fonts don't behave. EVERY single thing is crappy.)
The useful thing about libreoffice is that I can make my own color palettes for my drawings. The inbuilt and other downloadable color palettes I found were either too detailed or too ugly. I have been seeing ColorBrewer used to great effect in many graphical presentations of late, so I set about making a libreoffice palette with Colorbrewer colors.
I found the complete ColorBrewer set at this page at google code.
The idea is to take this code and transform it into a .soc file in the hidden directory: .libreoffice/3/user/config I know this is a perl script waiting to be written. But perl teething troubles lead to a quick and dirty cut-and-paste-the-manual-way-in-10-seconds.
The soc file code for libreoffice with the Spectral diverging 11 palette from Colorbrewer looks somewhat like this:
The complete color palette series in Colorbrewer is:
This is from the R graphics manual help page. Maybe the names for the color palette's individual colors can come from here.
Now, let's see if I can make reproductive histories pretty.
---
NB2: Escaped the raw HTML characters with this online tool.
The useful thing about libreoffice is that I can make my own color palettes for my drawings. The inbuilt and other downloadable color palettes I found were either too detailed or too ugly. I have been seeing ColorBrewer used to great effect in many graphical presentations of late, so I set about making a libreoffice palette with Colorbrewer colors.
I found the complete ColorBrewer set at this page at google code.
The idea is to take this code and transform it into a .soc file in the hidden directory: .libreoffice/3/user/config I know this is a perl script waiting to be written. But perl teething troubles lead to a quick and dirty cut-and-paste-the-manual-way-in-10-seconds.
The soc file code for libreoffice with the Spectral diverging 11 palette from Colorbrewer looks somewhat like this:
<?xml version="1.0" encoding="UTF-8"?>
<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
<draw:color draw:name="SpectralDiv11A" draw:color="#9E0142"/>
<draw:color draw:name="SpectralDiv11B" draw:color="#D53E4F"/>
<draw:color draw:name="SpectralDiv11D" draw:color="#F46D43"/>
<draw:color draw:name="SpectralDiv11F" draw:color="#FDAE61"/>
<draw:color draw:name="SpectralDiv11G" draw:color="#FEE08B"/>
<draw:color draw:name="SpectralDiv11H" draw:color="#FFFFBF"/>
<draw:color draw:name="SpectralDiv11I" draw:color="#E6F598"/>
<draw:color draw:name="SpectralDiv11J" draw:color="#ABDDA4"/>
<draw:color draw:name="SpectralDiv11L" draw:color="#66C2A5"/>
<draw:color draw:name="SpectralDiv11N" draw:color="#3288BD"/>
<draw:color draw:name="SpectralDiv11O" draw:color="#5E4FA2"/>
</office:color-table>
The complete color palette series in Colorbrewer is:
maxcolors category
BrBG 11 div
PiYG 11 div
PRGn 11 div
PuOr 11 div
RdBu 11 div
RdGy 11 div
RdYlBu 11 div
RdYlGn 11 div
Spectral 11 div
Accent 8 qual
Dark2 8 qual
Paired 12 qual
Pastel1 9 qual
Pastel2 8 qual
Set1 9 qual
Set2 8 qual
Set3 12 qual
Blues 9 seq
BuGn 9 seq
BuPu 9 seq
GnBu 9 seq
Greens 9 seq
Greys 9 seq
Oranges 9 seq
OrRd 9 seq
PuBu 9 seq
PuBuGn 9 seq
PuRd 9 seq
Purples 9 seq
RdPu 9 seq
Reds 9 seq
YlGn 9 seq
YlGnBu 9 seq
YlOrBr 9 seq
YlOrRd 9 seq
This is from the R graphics manual help page. Maybe the names for the color palette's individual colors can come from here.
Now, let's see if I can make reproductive histories pretty.
---
NB2: Escaped the raw HTML characters with this online tool.
Mar 7, 2012
Complicated Longtables: Useful posts from Stackexchange
‡
dissertation,
latex,
tables
Longtables are full of quirks but tex.stackexchange makes things easier for troubled longtablers by bringing together some of the most helpful people to well... help out.
Complicated Longtables with:
Complicated Longtables with:
Jan 2, 2012
The Graphical Grammar of Analyses.
Been reading a lot about ggplot2 and experimenting with its very elegant graphing capabilities. Underneath the beautiful designs are even more beautiful statistical principles.
The goal is to really see what the data look like and build on analyses approaches from there. The analyses is not lost in a mesh of numbers that the brain has trouble processing. Accompanying each step is a visual cue towards what is going on.
The way I process it, for my dissertation it is:
Describe
Describe in numbers.
Describe in pictures.
Describe in words.
Model
Is this model appropriate? Does it "fit" the data?
Are there influential data distorting the risk estimates?
What are the risk estimates?
What is the confidence I can place on these estimates?
Build the model
Throw in more variables in the model.
Are these changing anything?
Can these changes be explained by biology?
Is it interaction?
Is it confounding?
Explain the universe
Throw everything together?
What does it all tell me?
Approach data analyses in layers.
Simplify and harvest the maximum information from each layer.
Unify these harvest and view the bigger picture.
The goal is to really see what the data look like and build on analyses approaches from there. The analyses is not lost in a mesh of numbers that the brain has trouble processing. Accompanying each step is a visual cue towards what is going on.
The way I process it, for my dissertation it is:
Describe
Describe in numbers.
Describe in pictures.
Describe in words.
Model
Is this model appropriate? Does it "fit" the data?
Are there influential data distorting the risk estimates?
What are the risk estimates?
What is the confidence I can place on these estimates?
Build the model
Throw in more variables in the model.
Are these changing anything?
Can these changes be explained by biology?
Is it interaction?
Is it confounding?
Explain the universe
Throw everything together?
What does it all tell me?
Dec 16, 2011
LaTeX for Landscaped Longtables
‡
dissertation,
formatting,
latex,
tables,
writing
Header for landscaped tables with the mandatory 1.8" to 2.0" bound-thesis margin (nevermind the fact that no one actually knows if and whether these bound theses serve any use at all in this electronic age).
For the UofR thesis, the stuffy rules are:
Letter-sized page: 8.5 X 11"
Left margin: 1.8"
Right, top and left margins: 1.25"
In the geometry package, this means a printable total area of:
Horizontal: 8.5 - (1.8 + 1.25) = 5.45
Vertical: 11 - (1.25*2) = 8.5
total={5.45in,8.5in}
The table is a 3 column longtable multipage table with alternating color rows.
-------------
Installing TeX packages on the fly:
For the UofR thesis, the stuffy rules are:
Letter-sized page: 8.5 X 11"
Left margin: 1.8"
Right, top and left margins: 1.25"
In the geometry package, this means a printable total area of:
Horizontal: 8.5 - (1.8 + 1.25) = 5.45
Vertical: 11 - (1.25*2) = 8.5
total={5.45in,8.5in}
The table is a 3 column longtable multipage table with alternating color rows.
\documentclass[11pt]{article}
\usepackage[landscape, tmargin=1.8in, bmargin=1.25in, hmargin=1.25in,centering]{geometry}
\usepackage{longtable}
\usepackage[table]{xcolor}
\usepackage[none]{hyphenat}
\usepackage[T1]{fontenc}
\usepackage[default]{cantarell}
\usepackage{booktabs}
\definecolor{tableShade}{HTML}{F1F5FA}
\definecolor{tableShade2}{HTML}{ECF3FE}
\pagestyle{empty}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\arraystretch}{1.3} %Sets row height
\setlength{\tabcolsep}{1.5pt} % Specifies column separation
\begin{document}
\begin{center}
\textbf{Title 1 goes here.}\\
\textbf{Title 2 goes here}\\\vspace{2em}
\textbf{Table x.1: Title of the table.}\\
\textbf{}\\
\end{center}
\setlength\LTleft{0in}
\setlength\LTright\fill
\rowcolors{1}{tableShade}{white}\centering %[commands]{row}{odd-row color}{even-row color}
\begin{longtable}{>{\raggedright}p{4cm}p{5cm}p{11cm}}
\midrule
\hiderowcolors
\textbf{Heading of 1st column} & \textbf{Heading of 2nd column}& \textbf{3rd Col Heading\protect\footnotemark[1] and heading continued}\\
\addlinespace[0.5em]
\midrule
\endhead
%\multicolumn{3}{c}[1]{Some footnote goes here x.x}\\
\midrule
\endfoot
\showrowcolors
% Table data goes here
\end{longtable}
\end{document}
-------------
Installing TeX packages on the fly:
yum install 'tex(epsfig.sty)' Next project: Try and emulate the look and fee of this table. Font is Gotham and it's some baby blue color with white rules. The question is can I use the xcolor package and specify that color with hex codes?
Subscribe to:
Posts (Atom)