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 '18 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 '18 at 14:46
\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

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.