1

I have non-contiguous date/time data (eg weekend data are missing - I don't have rows in data file for them) and I'd like to not to draw them. Graphically, it would be like cutting out a vertical slice of a plot. I'm aware that the X scale would not be linear and am perfectly happy with this. Here it is what I want to get rid of:

candlestick plot

The gnuplot script is auto-generated so it doesn't have to be very neat if it can't be. Currently I'm doing:

set xdata time
set timefmt "%d/%m/%Y-%H:%M:%S"
unset mx2tics
unset mxtics
set xtics border in scale 1,0.5 nomirror rotate font "Times-Roman,12" "$time_min", $xtics, "$time_max"
set xrange ["$time_minb" : "$time_maxb"]
set grid xtics back

Where obviously $var is a proper value of some variable $var. What I'd like to retain: some small (1-2 candles) margin on the left and on the right (between box border and data), labeled ticks every 10 candles. Ideally all ticks at the borders of time intervals that would be put together in X axis would be marked. Also in the perfect world those labels would be slightly drawn aside to not to overlap each other. But I'm not very picky, I could bear even overlapping of the 2 labels on the joint of 2 intervals if only "empty piece" of a plot is removed.

BTW: I have gnuplot 4.6 but can update to 5.0 if it's necessary.

Martin Evans
  • 43,220
  • 16
  • 78
  • 90
  • I realized the first sentence of the problem description may be misleading: I don't want to draw only the time interval that I have no data in. Just cut out part of X that I have no Y points in. – Marcin Balcerzak Mar 25 '15 at 14:08
  • Are you looking for broken axis? If so, have a look at [this answer](http://stackoverflow.com/a/17683126/2043505) or either [this website](http://gnuplot-surprising.blogspot.com/2011/10/broken-axes-graph-in-gnuplot-3.html) or [this other website](http://www.phyast.pitt.edu/~zov1/gnuplot/html/broken.html). – Schorsch Mar 26 '15 at 14:37

0 Answers0