I am trying to create a Tikz node with some text that has the ‘data storage’ flowchart shape:

Data Storage or Stored Data Symbol

This is what I'm building on:

\tikzstyle{storage} = [rectangle, minimum width=3cm, minimum height=1cm, text width=3cm, text centered, draw=black]
\begin{tikzpicture}[node distance=2cm]
    \node (sto1) [storage] {Some text}

I have been trying to get the data storage node shape, mainly referring to this question as well as this one, however I haven't succeeded in creating it.

  • 1
    Are you looking for \tikz\node[cylinder, aspect=.5, minimum height=5mm, cylinder uses custom fill, cylinder body fill=blue!30, draw] {}; ?
    – Kpym
    May 11, 2018 at 14:28
  • @Kpym This seems to create a cylinder which has the fill that I want but still the borders of a cylinder.
    – hb20007
    May 11, 2018 at 14:46

3 Answers 3

\makeatletter % https://tex.stackexchange.com/a/241737/121799
\tikzset{pics/named scope code/.style={code={\tikz@fig@mustbenamed%
  \begin{scope}[local bounding box/.expanded=\tikz@fig@name]#1\end{scope}%
  pic memory/.style={named scope code={
  \filldraw[fill=blue!30!gray!50](0,0) arc(90:270:0.5 and 1) --++(4,0) arc(-90:-270:0.5 and 1) --cycle
 node[pos=.6,below={1cm},anchor=center] {#1};
\pic (memory1) at (0,0) {pic memory=Test text};
\draw[thick,blue,-latex] (memory1.west) -- ++(-2,0);
\draw[thick,red,-latex] (memory1.north) -- ++(-1,2);

enter image description here


Something like this can be done with a rounded rectangle node:

\documentclass[tikz, border=1mm]{standalone}
    datastore/.style={draw, rounded rectangle, rounded rectangle east arc=concave, rounded rectangle arc length=150}

\node[datastore, minimum width=4cm, minimum height=1.5cm, fill=cyan!30, draw=cyan!70!black]{Example};

enter image description here


To draw a flowchart symbol for "Storage", similar to the one mentioned in "display" shape for flowchart with tikz , you can use the following code.

  \usetikzlibrary{shapes.geometric, arrows}
  \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text 
   width=3cm, draw=orange, fill=orange!20]
  \tikzstyle{arrow} = [thick,->,>=stealth]
    \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
      % points
      \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
      \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
      % dimensions
      % path
          \pgfpatharc{-90}{90}{0.2\pgfutil@tempdima and 0.5\pgfutil@tempdimb}
      \pgfpatharc{90}{-90}{0.2\pgfutil@tempdima and 0.5\pgfutil@tempdimb}
  \tikzstyle{disp} = [display, draw, fill = cyan!20, 
  text width = 5em, align=center, minimum height = 3.5em]
  \pgfplotsset{width=10cm, compat=1.9}
  \begin{tikzpicture}[node distance=2cm]
  \node (disp) [disp] {Storage};
  \node (pro2b) [process, right of = disp, xshift=2cm] {Process 2b};
  \draw [arrow] (disp) -- (pro2b);

enter image description here

  • Welcome to TeX.SE!
    – Mensch
    Mar 25 at 20:11

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.