SlideShare a Scribd company logo
1 of 68
有圖有真相
如何使用 Open Source 工具在程式內整合圖檔
黃志賢 hoyo
友情提示:簡報中圖檔皆屬原創作人所有
什麼是真相!?
柯南都這樣說
大家都說:
「老闆腦中只想著賺錢。」
沒圖沒真相…
感
謝
是
本
人
的
mark
授
權
使
用
版
權
創
意
為
mark
所
有
以上為大眾版
畫圖畫圖
圖要怎麼畫?
X
程式是文字
資料庫也是文字
圖片為什麼不能是文字
_
/  ̄ )
/ /
/ _/
/ |
/ __ |
| ̄  ̄ ̄ヽ|
| __ |
_ -―  ̄ __ ̄ ̄ ┴- 、
{ / ̄  ̄ ̄ヽ ヽ
` -∩_|_ (_・) (_・) _ | ∩_ノ
⊂_ _つ`z――y´ ノ~⊂_ _つ
{ }`-/⌒⌒i-´ { }
` -| | | | `i -´
| `ー‐ ´ `-~,
ヽ ___, --~´
, -‐、 , -.、
/ ノ ノ ノ
/ 、_.ノ ./ 、_.ノ´
/ ノ / .ノ ,,-‐'⌒i
. / __ノ / /⌒ii´ /、_ .ノ´.
l. `iノ / / |/ ,.'~´ .
| ,,,|./ ``´.丿 、_ノ ,-‐'´⌒)
. l. |``''' / .ノ ./ 丶,-‐'´
| ,___l |、. / / 、,,/
. | ノ | `` '´-、 ,ノ
| _/ |` ‐、__ )
| / ヽ-、 _ ̄`|
| . ヽ::::.` 、,|
| :. |:::: |
| :: |:::: |.
λ::: ノ:: 丿
/ , ::::::'/
/ :/:::::::::/
/ ::/:::::::::/
_/ :::::::::::::/_
, -‐´ / ::::::::::::::/ `‐- 、
(, / :::::::::::::/ )
` ‐- _ :::::::::::/ _ -‐'´
/⌒ヽ / ̄ヽ
_|__ヽ,-/ |
,,-'"....:::::::::::::::::::::::ヽ、 |
/..........:::::::::::::::::::::::::::::::::ヽ_ノ
/::::::::::::::::::::::::::::::::::::::::::::::::::::ヽヽ.
/:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::ヽ ヽ
|::::::::::|ヽ(\( \__ヽ_ヽ、::::::::::::::::::i ヽ.
ヽ::::::::i -‐- -‐‐- ヽ::::::::::::::::i /
\::i`'⌒ `⌒ |::::::::::::::::i
i::::::i ノ |::::::::::::::::::i
|:::::::i ヽ__ /::::::::::::::::::::i
|:::: ::ヽ 丶 ノ /::::::::::::::::::::::::i
|:::: :::::\ ` , /::::::::::::::::::::::::::::i
|::: :::::::::``. - ´ |::::::::::::::::::::::::::::::i
i::::: :::::::::::::::ト、_,,/´ ヽ::::::::/‐、:::::/
/lヽ::::: :::::::::::|/ヽ / ̄ /ヽ
/ ヽ ` T `>lコ< ̄| ,/ ヽ
/ ヽ |/|| || \| ,/ ヽ
\___| |_| |__/
| | | |
_ , ― 、
,-' `  ̄ヽ_
,' ヽ
( )
( ノ`ー'ー'ヽ )
( ノ● ●( )
( 〉 -――-( )_ _
`ー'l ● ( ノ ヽ )
、‘ー'ー’ _ノ`ー' |
 ̄| ̄ |
/ /7 / ̄ ̄/ /
`ー´ `ー ´ `―´
事情的起源由我從電腦裡拿出
暗黑破壞神的赫拉迪克方塊開始
維特之腳
城鎮傳送書
赫拉迪克方塊配方用法說明
文字敘述 1
文字敘述 2
文字敘述 3
文字敘述 4
想要的結果
or
不想要的結果
章子怡的臉型
范冰冰的眼睛
劉亦菲的鼻子
張柏芝的眉毛
張曼玉的雙唇
大誤
本片開始
現實狀況劇一
大 BOSS:「阿賢,把數字銷售報
表改成圖表,看數字沒 FU」
1231.5400
4565.4500
5646.500
6546.600
2300.000
9546.400
6546.600
3212.3300
13255.400
564.6500
75343.000
12345.400
 官網: http://jpgraph.net/
 文字語言: Object
 Open Source:是
http://jpgraph.net/
折線圖入門配方
折線圖 Line
條狀圖 Bar
條狀圖入門配方
折線圖 Line
條狀圖 Bar
現實狀況劇二
琴酒:「很持酒,九月九的酒掛了,
將組織圖更新一下」
八點檔開播時人物關係圖
三百集後……
Graphviz
 官網: http://www.graphviz.org/
 文字語言:DOT Language
 Open Source:是
Graphviz
digraph G {
“大老闆”->”秘書”
}
> dot 1.dot -Tpng >1.png
Graphviz 入門配方
digraph G {
“大老闆”->”秘書”
“秘書”->”小秘書(1)”
“秘書”->”小秘書(2)”
“秘書”->”小秘書(3)”
}
> dot 1.dot -Tpng >1.png
Graphviz 一級配方
現實狀況劇三
~!@#$%︿&* ~!@︿&*
~!@#$%︿&* ~!@︿&*
~!@#$%︿&* ~!@︿&*
~!@#$%^&*
~!@#$%^&*
~!@#$%^&*
 官網:http://www.latex-project.org/
 文字語言:TeX
 Open Source:是
 30 年歷史
 越來越多出版社全部或局部使用 TeX 排版
(美國、日本、大陸… 就是沒台灣)
入門配方
documentclass{article}
begin{document}
Hello world!
end{document}
> latex 1.tex
> dvips 1.dvi
> ps2pdf 1.ps
數學公式
$sum_{i=0}ˆ2 $
[ z = left{
begin{array}{ll}
1 & (x>0)
0 & (x<0)
end{array}
right.
]
現實狀況劇四
幫我們畫精確的數學圖型吧!
正三角形 ABC
線段 AB 的二分之一
交於角 C
MetaPost
 官網:http://www.tug.org/metapost.html
 文字語言:MetaFont
 Open Source:是
 可和 LaTeX 融合
METAPOST
http://melusine.eu.org/syracuse/metapost/
METAPOST 拜碼頭程式碼
beginfig(1)
draw (0,0)--(1cm,0)--(0,1cm)--cycle;
endfig;
end
> mpost 1.mp
編譯指令
檔案內容
METAPOST 入門配方
> mpost 1.mp
編譯指令
檔案內容
beginfig(1)
pair A, B, C;
A:=(0,0); B:=(2cm,0);
C:=(1cm,2cm);
draw A--B--C--cycle;
draw 1/2[A,B] -- C;
label.lft( btex A etex, A );
label.rt( btex B etex, B );
label.top( btex C etex, C );
endfig;
end
METAPOST 基本配方
beginfig(1)
pair A,B,C,D;
u:=2cm;
A=(0,0); B=(u,0); C=(u,u); D=(0,u);
transform T;
A transformed T = 1/5[A,B];
B transformed T = 1/5[B,C];
C transformed T = 1/5[C,D];
path p;
p = A--B--C--D--cycle;
for i=0 upto 100:
draw p;
p:= p transformed T;
endfor;
endfig;
end
MetaPost
LaTeX 附加 METAPOST
http://math.berkeley.edu/~vojta/tex/samp-l/mpost.htm
file.tex
documentclass{article}
usepackage{graphicx}
begin{document}
Hi there: includegraphics{file1.mps}
end{document}
file.mp
filenametemplate "%j%c.mps";
beginfig(1);
z1=(0,0);
z2=(10mm,10mm);
drawarrow(z1--z2);
label.ulft(btex $A$ etex, .5[z1,z2]);
endfig;
bye
> mpost file
> latex file
> dvipdfmx file
編譯指令
有圖真有真相乎
?
往上滾的球
請看操演…
誇大
齊頭
有圖有真相!
有圖有真相?
全劇終

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

有圖有真相