10

I want to make the following new R logo with tikz.

enter image description here

My MWE with output is:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}[]

\node[blue] at (0,0)  {R};
\draw (0,0) ellipse (28pt and 20pt);
\draw (0,0) ellipse (18pt and 14pt);

\end{tikzpicture}

\end{document}

enter image description here

My output is not very close to the desired result. Any help in this regard will be highly appreciated. Thanks

14

The best thing is to export everything from Inkscape but here I've just exported the R letter and placed it over the ellipses via the old logo colors. You might need to adjust it properly I'm just approximating here.

\documentclass[tikz]{standalone}
\definecolor{rlogo}{RGB}{126,142,176}    
\begin{document}
\begin{tikzpicture}
\shade[even odd rule,shading angle=-110] (0,0) ellipse [x radius=3,y radius=2] (0.4,-0.1) ellipse [x radius=2.4,y radius=1.5];
\begin{scope}[shift={(-1.6cm,1.8cm)},x=1pt,y=-1pt,scale=0.2]
\path[fill=rlogo,nonzero rule] (210.3155,173.1696) -- (210.3155,582.9834) --
  (331.7405,582.9834) -- (331.7405,423.6084) .. controls (362.0967,423.6084) and
  (377.2780,416.0209) .. (400.0467,453.9646) .. controls (430.4029,507.0896) and
  (468.3467,582.9834) .. (468.3467,582.9834) -- (612.5417,582.9834) .. controls
  (612.5417,582.9834) and (521.4717,431.1971) .. (513.8792,423.6084) .. controls
  (499.8854,408.4334) and (483.5229,408.4334) .. (460.7592,400.8396) .. controls
  (506.2917,393.2521) and (546.9317,373.8234) .. (561.6917,332.5396) .. controls
  (574.5917,294.5946) and (573.0792,246.3284) .. (545.4230,213.9596) .. controls
  (521.4717,188.3446) and (498.7042,173.1696) .. (437.9905,173.1696) --
  (210.3155,173.1696) -- cycle(331.7405,256.6509) -- (411.4280,256.6509) ..
  controls (430.3242,256.6509) and (445.5792,275.6209) .. (445.5792,294.5946) ..
  controls (445.5792,313.5646) and (430.4030,332.5396) .. (411.4280,332.5396) --
  (331.7405,332.5396) -- (331.7405,256.6509) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

  • 1
    +1. If you want the same shade of blue as in the original, \definecolor{rlogo}{RGB}{55,77,185} . – Gonzalo Medina Jul 20 '15 at 22:21
  • @GonzaloMedina: Also need some modifications for ellipse colors and shades. – MYaseen208 Jul 21 '15 at 3:31
5
\documentclass[tikz]{standalone}
\definecolor{grayR}{HTML}{8A8990}
\definecolor{grayL}{HTML}{C4C7C9}
\definecolor{blueM}{HTML}{1F63B5}   
\begin{document}  
\begin{tikzpicture}

\shade [right color=grayR,left color=grayL,shading angle=60] 
(-3.55,0.3) .. controls (-3.55,1.75) 
and (-1.9,2.7) .. (0,2.7) .. controls (2.05,2.7)  
and (3.5,1.6) .. (3.5,0.3) .. controls (3.5,-1.2) 
and (1.55,-2) .. (0,-2) .. controls (-2.3,-2) 
and (-3.55,-0.75) .. cycle;

\fill[white] 
(-2.15,0.2) .. controls (-2.15,1.2) 
and (-0.7,1.8) .. (0.5,1.8) .. controls (2.2,1.8) 
and (3.1,1.2) .. (3.1,0.2) .. controls (3.1,-0.75) 
and (2.4,-1.45) .. (0.5,-1.45) .. controls (-1.1,-1.45) 
and (-2.15,-0.7) .. cycle;

\fill[blueM] 
(1.75,1.25) -- (-0.65,1.25) -- (-0.65,-2.75) -- (0.55,-2.75) -- (0.55,-1.15) -- 
(0.95,-1.15)  .. controls (1.15,-1.15) 
and (1.5,-1.9) .. (1.9,-2.75) -- (3.25,-2.75)  .. controls (2.2,-1) 
and (2.5,-1.2) .. (1.8,-0.95) .. controls (2.6,-0.9) 
and (2.85,-0.35) .. (2.85,0.2) .. controls (2.85,0.7) 
and (2.5,1.2) .. cycle;

\fill[white]  (1.4,0.4) -- (0.55,0.4) -- (0.55,-0.3) -- (1.4,-0.3).. controls (1.75,-0.3) 
and (1.75,0.4) .. cycle;

\end{tikzpicture}
\end{document}

R Symbol with TikZ

2

I could not reinstall svg2tikz plugin on the new version of inkscape, but in command line on ubuntu, one can run:

wget https://upload.wikimedia.org/wikipedia/commons/1/1b/R_logo.svg
pip install git+git://github.com/aloisklink/svg2tikz --user
svg2tikz --figonly R_logo.svg 

First line downloads the svg for the R logo, second installs the svg2tikz python library, third line exports the svg file to tikz. Note I install a fork of the original svg2tikz

You get:

\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
\path[even odd rule] (361.4530,485.9370) .. controls (162.3290,485.9370) and
  (0.9060,377.8280) .. (0.9060,244.4690) .. controls (0.9060,111.1090) and
  (162.3290,3.0000) .. (361.4530,3.0000) .. controls (560.5780,3.0000) and
  (722.0000,111.1090) .. (722.0000,244.4690) .. controls (722.0000,377.8280) and
  (560.5780,485.9370) .. (361.4530,485.9370) -- cycle(416.6410,97.4060) ..
  controls (265.2890,97.4060) and (142.5940,171.3140) .. (142.5940,262.4840) ..
  controls (142.5940,353.6540) and (265.2890,427.5620) .. (416.6410,427.5620) ..
  controls (567.9920,427.5620) and (679.6870,377.0330) .. (679.6870,262.4840) ..
  controls (679.6870,147.9710) and (567.9920,97.4060) .. (416.6410,97.4060) --
  cycle;
\path[even odd rule] (550.0000,377.0000) .. controls (550.0000,377.0000) and
  (571.8220,383.5850) .. (584.5000,390.0000) .. controls (588.8990,392.2260) and
  (596.5100,396.6680) .. (602.0000,402.5000) .. controls (607.3780,408.2120) and
  (610.0000,414.0000) .. (610.0000,414.0000) -- (696.0000,559.0000) --
  (557.0000,559.0620) -- (492.0000,437.0000) .. controls (492.0000,437.0000) and
  (478.6900,414.1310) .. (470.5000,407.5000) .. controls (463.6680,401.9690) and
  (460.7550,400.0000) .. (454.0000,400.0000) .. controls (449.2980,400.0000) and
  (420.9740,400.0000) .. (420.9740,400.0000) -- (421.0000,558.9740) --
  (298.0000,559.0260) -- (298.0000,152.9380) -- (545.0000,152.9380) .. controls
  (545.0000,152.9380) and (657.5000,154.9670) .. (657.5000,262.0000) .. controls
  (657.5000,369.0330) and (550.0000,377.0000) .. (550.0000,377.0000) --
  cycle(496.5000,241.0240) -- (422.0370,240.9760) -- (422.0000,310.0260) --
  (496.5000,310.0020) .. controls (496.5000,310.0020) and (531.0000,309.8950) ..
  (531.0000,274.8770) .. controls (531.0000,239.1550) and (496.5000,241.0240) ..
  (496.5000,241.0240) -- cycle;

\end{tikzpicture}

which is not super nice but can be used as a starting point.

  • Can you explain what wget is and how it is used? and pip ? and svg2tikz ? For which operating systems does your solution work: windows ? linux ? mac? – AndréC Sep 18 '18 at 18:02
  • Thank you, can you edit your answer by adding these explanations? – AndréC Sep 19 '18 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.