Publishable Quality Graphics I Raster Formats: Png, Jpeg, Tiff, Gif, Bmp,

Publishable Quality Graphics I Raster Formats: Png, Jpeg, Tiff, Gif, Bmp,

MATH36032 Problem Solving by Computer Publishable Quality Graphics I Raster formats: png, jpeg, tiff, gif, bmp, ... I Vector formats: svg, ... I Container formats (for special graphic softwares): cpt (Corel Photo Paint), psd (Adobe PhotoShop), psp (Corel Paint Shop Pro), xcf (GIMP), ... Different formats for different usage: jpeg/jpg for photo; gif for animation; ... Other differences: Lossy/lossless compression Which format of figures (images) do you know? Which format of figures (images) do you know? I Raster formats: png, jpeg, tiff, gif, bmp, ... I Vector formats: svg, ... I Container formats (for special graphic softwares): cpt (Corel Photo Paint), psd (Adobe PhotoShop), psp (Corel Paint Shop Pro), xcf (GIMP), ... Different formats for different usage: jpeg/jpg for photo; gif for animation; ... Other differences: Lossy/lossless compression Raster Image vs Vector Image Any difference between the two logos? (keep on zooming in) Use vector images (eps,svg,...) whenever possible! Exporting jpg directly from MATLAB x = linspace(0,5,101); plot(x,erf(x),x,airy(−5*x)) % Save as"jpg" figure What could be improved for this figure? The improved figure 1 Error Function 0.75 Airy Function 0.5 0.25 f(x) 0 −0.25 −0.5 0 1 2 3 4 5 x More points for "Airy Function"; increase line width; better resolution; less ticks in horizontal axis(?); extend the vertical axis (above one); legend explaining the curves; different styles for the two functions; ... Compare them together 1 Error Function 0.75 Airy Function 0.5 0.25 f(x) 0 −0.25 −0.5 0 1 2 3 4 5 x Know the names first ... 1 Error Function 0.75 Airy Function 0.5 legend 0.25 f(x) 0 −0.25 XTick −0.5 0 1 2 3 4 5 x <− xlabel Default setting and its improvement I Narrow line width? plot( ..., 'Linewidth',2) I Small font size? (gca : get current axis) set(gca,'fontsize',18); I Axis label xlabel('x','fontsize',14,'fontname','times roman') I Axis Tick set(gca,'XTick',0:1:5) I More complicated legend? lg = legend('Error Function','Airy Function'); set(lg,'Position',[0.48 0.75 0.45 0.1], ... 'box','off'); Finally, save the right format (for Latex) print -depsc2 myfig.eps % c for color print -deps2 myfig.eps % for black white I Warning: What you see on screen may not exactly be the resulting eps or pdf file, need fine tuning of the parameters I DO NOT print (or save) to pdf directly (will be a figure in a full A4 paper, too much unwanted space above and below the figure) I Figures may look different on different devices (screen, printer, projector, ..) or even different viewer. In Microsoft Word, it is done differently ... Edit Copy Figure and then Paste (or shortcut Ctrl+V). ! A4 colour single-sided 21p ⊕ A4 colour double-sided (duplex) 40p ⊕ Many publications (journal articles, textbooks, ...) are still only black-white. Color vs Black-white University Printing Costs: A4 mono single-sided 5p ⊕ A4 mono double-sided (duplex) 8p ⊕ Color vs Black-white University Printing Costs: A4 mono single-sided 5p ⊕ A4 mono double-sided (duplex) 8p ⊕ A4 colour single-sided 21p ⊕ A4 colour double-sided (duplex) 40p ⊕ Many publications (journal articles, textbooks, ...) are still only black-white. Color, black-white, or does not matter? Two exactly the same figures (using print -depsc2 colorfig.eps and print -deps2 grayfig.eps) 1 1 0.8 0.8 0.6 0.6 x x 0.4 0.4 0.2 0.2 0 0 2.6 2.8 3 3.2 3.4 3.6 3.8 4 2.6 2.8 3 3.2 3.4 3.6 3.8 4 r r Which color to use? 1 0.8 0.6 0.4 0.2 0 −0.2 −0.4 −0.6 −0.8 −1 0 1 2 3 4 5 6 7 You may never use certain color(s). To differentiate different curves using line styles instead: plot(x,y1,'--',x,y2,'-*',x,y3,'-d', 'MarkerSize',6); Other vector graphics: Asymptote http://asymptote.sourceforge.net/ The footbal The Sierpinski Sponge Other vector graphics: tikz/pgf http://www.texample.net/tikz/ Editors Pro TEXt TEX MiKTEX pdfTEX 3 4 Systems TEX Engines 2 TEXLive X TE EX 1 5 LuaTEX Mac TEX Formats 9 ConTEXt LATEX 6 7 8 The mindmap A complete graph Gallery made by me (using Asymptote) p=1.25 0.1 p=1.50 p=1.80 RF p=1.95 Branch point 0 z = x + iǫ − W(r) Branch cut −0.1 −0.2 1 2 3 4 z = x iǫ r ρF on x RF − − | | ≤ y v w = f(z) r = r(θ) dθ x u θ τwk τw1 τw1 τw2 xj 1 xj xj+1 xj+2 xj+k − z = z(x) b U ∞ How the source code looks like? Asymptote code for "Football" Tikz/PGF code for "Mindmap" import graph3; size(400); nbeginftikzpictureg currentlight.background=palegreen; npath [ dtrender=render(compression=Zero,merge=true); mindmap, text = white, real c=(1+sqrt(5))/2; level 1 concept/.append style = ffont=nLargenbfseries, sibling angle=90g, triple[] x=f(0,c,1),(0,-c,1),(0,-c,-1)g; level 2 concept/.append style = triple[] y=f(1,0,c),(1,0,-c),(-1,0,-c)g; ffont=nnormalsizenbfseriesg, triple[] z=f(c,1,0),(-c,1,0),(-c,-1,0)g; level 3 concept/.append style = triple[][] Q= f ffont=nsmallnbfseriesg, fz[0],y[1],x[3],x[0],y[0],z[3]g, tex/.style = fconcept, ball color=blue, fz[1],x[0],x[3],y[2],z[2],y[3]g, font=nHugenbfseriesg, fz[2],z[1],y[2],x[2],x[1],y[3]g, engines/.style = fconcept, ball color=green!50!blackg, fz[3],z[0],y[0],x[1],x[2],y[1]g, formats/.style = fconcept, ball color=blue!50!blackg, fx[0],x[3],z[1],y[3],y[0],z[0]g, systems/.style = fconcept, ball color=red!90!blackg, fx[1],x[2],z[2],y[3],y[0],z[3]g, editors/.style = fconcept, ball color=orange!90!blackg fx[2],x[1],z[3],y[1],y[2],z[2]g, ] fx[3],x[0],z[0],y[1],y[2],z[1]g, node [tex] fTEXg [clockwise from=0] fy[0],y[3],x[1],z[3],z[0],x[0]g, fy[1],y[2],x[2],z[3],z[0],x[3]g, child[concept color=green!50!black, nodes=fenginesg] f fy[2],y[1],x[3],z[1],z[2],x[2]g, node fEnginesg [clockwise from=90] fy[3],y[0],x[0],z[1],z[2],x[1]g child f node fnTeXg g g; child f node fpdfnTeXg g child f node fnXeTeXg g path3 p=arc(O,Q[0][0],Q[0][1]); child f node fLuanTeXg gg real R=abs(point(p,reltime(p,1/3))); . Much more complicated than a programming language! Summary I Use vector graphics if possible I Use the right format I Fine tuning the parameters, and pay attention to small details I Figures should complement your writing, and should be referred in the main text I You can invest your time in more advanced graphics (Asymptote, Tikz/PGF, SVG,xfig,...) in the future..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    20 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us