File tree 6 files changed +16
-9
lines changed
6 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -718,7 +718,7 @@ \section{Running It}\label{s:capstone-run}
718
718
+ Built in 20.15 s.
719
719
\end {minted}
720
720
721
- \figimg {figures/capstone-first-attempt.png}{First Attempt at Viewing Capstone Project}{f:capstone-first-attempt}
721
+ \figimgscale {figures/capstone-first-attempt.png}{First Attempt at Viewing Capstone Project}{f:capstone-first-attempt}{0.5 }
722
722
723
723
We then open \texttt {http://localhost:4000} in our browser and see \figref {f:capstone-first-attempt}.
724
724
That's unexpected: we should see the initial data displayed.
@@ -783,15 +783,15 @@ \section{Running It}\label{s:capstone-run}
783
783
\noindent
784
784
and then re-launch our application to get \figref {f:capstone-second-attempt }.
785
785
786
- \figimg {figures/capstone-second-attempt.png}{Second Attempt at Viewing Capstone Project}{f:capstone-second-attempt}
786
+ \figimgscale {figures/capstone-second-attempt.png}{Second Attempt at Viewing Capstone Project}{f:capstone-second-attempt}{1.0 }
787
787
788
788
This is much better.
789
789
We can now type some dates into the `` start'' and `` end'' boxes and,
790
790
after we press `` update'' ,
791
791
we get a chart and table of the aggregated statistics for the year range given
792
792
(\figref {f:capstone-complete }).
793
793
794
- \figimg {figures/capstone-complete.png}{Completed Capstone Project}{f:capstone-complete}
794
+ \figimgscale {figures/capstone-complete.png}{Completed Capstone Project}{f:capstone-complete}{1.0 }
795
795
796
796
We've built an interface,
797
797
used it to submit queries that are then handled by a server,
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ \chapter{Deploying}\label{s:deploy}
54
54
we'll be OK.
55
55
\end {itemize }
56
56
57
- \figimg {figures/glitch.png}{Glitch Deployment}{f:deploy-glitch}
57
+ \figimgscale {figures/glitch.png}{Glitch Deployment}{f:deploy-glitch}{0.5 }
58
58
59
59
Two things that \emph {aren't } automatically present are a license and a Code of Conduct,
60
60
but both can easily be added by clicking on the `` New File'' button.
Original file line number Diff line number Diff line change @@ -577,7 +577,7 @@ \section{Bootstrap}\label{s:htmlcss-bootstrap}
577
577
</html>
578
578
\end {minted}
579
579
580
- \figimg {figures/htmlcss-bootstrap.png}{Bootstrap Layout}{f:htmlcss-bootstrap}
580
+ \figimgscale {figures/htmlcss-bootstrap.png}{Bootstrap Layout}{f:htmlcss-bootstrap}{0.5 }
581
581
582
582
The page opens by loading Bootstrap from the web;
583
583
we can also download \texttt {bootstrap.min.css } and refer to it with a local path.
Original file line number Diff line number Diff line change @@ -588,7 +588,7 @@ \section{Fetching Data}\label{s:interactive-fetching}
588
588
\noindent
589
589
and run it to get \figref {f:interactive-asteroids-screenshot}.
590
590
591
- \figimg {figures/interactive-asteroids-screenshot.png}{Asteroids Application}{f:interactive-asteroids-screenshot}
591
+ \figimgscale {figures/interactive-asteroids-screenshot.png}{Asteroids Application}{f:interactive-asteroids-screenshot}{0.5 }
592
592
593
593
The next step is to handle date submission.
594
594
Since we're trying to instill good practices,
Original file line number Diff line number Diff line change 129
129
\caplbl {#2}{#3}%
130
130
\end {figure }}
131
131
132
+ % Image figures with scale (for screenshots).
133
+ \newcommand {\figimgscale }[4]{\begin {figure }%
134
+ \centering %
135
+ \includegraphics [scale=#4]{#1}%
136
+ \caplbl {#2}{#3}%
137
+ \end {figure }}
138
+
132
139
% PDF figures.
133
140
\newcommand {\figpdf }[3]{\begin {figure }%
134
141
\centering %
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ \section{Vega-Lite}\label{s:vis-vega-lite}
139
139
and feel very proud of ourselves
140
140
(\figref {f:vis-mark-encoding }).
141
141
142
- \figimg {figures/vis-mark-encoding.png}{Mark and Encoding}{f:vis-mark-encoding}
142
+ \figimgscale {figures/vis-mark-encoding.png}{Mark and Encoding}{f:vis-mark-encoding}{0.5 }
143
143
144
144
There are also some poorly-styled links for various controls that we're not going to use.
145
145
We can fill in the options argument to \texttt {vegaEmbed } to turn those off:
@@ -166,7 +166,7 @@ \section{Vega-Lite}\label{s:vis-vega-lite}
166
166
We now have the visualization we wanted
167
167
(\figref {f:vis-disable-controls }).
168
168
169
- \figimg {figures/vis-disable-controls.png}{Without Controls}{f:vis-disable-controls}
169
+ \figimgscale {figures/vis-disable-controls.png}{Without Controls}{f:vis-disable-controls}{0.5 }
170
170
171
171
Vega-Lite has a \emph {lot } of options:
172
172
for example,
@@ -210,7 +210,7 @@ \section{Vega-Lite}\label{s:vis-vega-lite}
210
210
211
211
\figref {f:vis-aggregate-points } shows the result.
212
212
213
- \figimg {figures/vis-aggregate-points.png}{Aggregating and Using Points}{f:vis-aggregate-points}
213
+ \figimgscale {figures/vis-aggregate-points.png}{Aggregating and Using Points}{f:vis-aggregate-points}{0.5 }
214
214
215
215
\section {Local Installation }\label {s:vis-vega-local }
216
216
You can’t perform that action at this time.
0 commit comments