public void printAllAround(String updatesChartFolder, Spike spike,
			long spikeTime, long timeBuffer, Colours colours) {
		colours.clearStats();

		String chartFolder = updatesChartFolder + "/" + spikeTime + "_"
				+ spike.getSpikeSize();
		String gnuplotFile = chartFolder + "/plot.gnu";

		try {

			// create chart folder if needed
			File gFile = new File(chartFolder);
			// empty folder if it was already existed
			if (gFile.exists()) {
				FileUtils.deleteDirectory(gFile);
			}
			gFile.mkdirs();

			// prepare to write a gnuplot script
			FileWriter gfwr = new FileWriter(gnuplotFile);
			BufferedWriter gbwr = new BufferedWriter(gfwr);

			// write header of gnuplot script
			gbwr.write("set term postscript enhanced color" + "\n"
					+ "set style fill solid" + "\n" + "set output '"
					+ spikeTime + "_" + spike.getSpikeSize() + ".eps'" + "\n"
					+ "set xtics format \"%10.0f\"" + "\n" + "set yrange [-1:]"
					+ "\n" + "set xrange [" + (spikeTime - timeBuffer - 5)
					+ ":" + (spikeTime + timeBuffer + 5) + "]" + "\n"
					+ "set key off" + "\n");

			gbwr.write("plot ");

			int dataFiles = 0;

			// go through all spikes in spike interval
			for (long time = spikeTime - timeBuffer; time <= spikeTime
					+ timeBuffer; time++) {

				// check all pairs {monitored AS, monitoring router}
				for (MonitoredAS monitoredAS : allUpdates.keySet()) {

					SingleASspikes spikes = allUpdates.get(monitoredAS);

					// if there is a spike within the time interval
					if (spikes.hasSpikeAtTime(time)) {

						// prepare file with spike sizes and times
						// gnuplot script will take data from these files
						File dump = new File(chartFolder + "/"
								+ monitoredAS.getMonitoredAS() + "_"
								+ monitoredAS.getMonitoringRouter());

						boolean exists = dump.exists();

						// prepare string to write
						String str = time + " "
								+ spikes.getSpikeAtTime(time).getSpikeSize()
								+ "\n";

						FileWriter fwr;
						BufferedWriter bwr;

						// if we have already dumped some spikes for this
						// {monitored AS, monitoring router} pair
						if (exists) {
							fwr = new FileWriter(dump, true); // then append it
							bwr = new BufferedWriter(fwr);
						} else {
							fwr = new FileWriter(dump); // create it
							bwr = new BufferedWriter(fwr);

							// if I create a new data file,
							// then I need to add it to the gnuplot script
							if (dataFiles == 0) { // if this is first data file
								gbwr.write("'" + dump.getName() + "' w i");// lc
																			// rgb
																			// '"
																			// +
																			// colours.getNext()
																			// +
																			// "'");
							} else {
								gbwr.write(", '" + dump.getName() + "' w i");// lc
																				// rgb
																				// '"
																				// +
																				// colours.getNext()
																				// +
																				// "'");
							}

							dataFiles++;
						}

						bwr.write(str);

						bwr.close();
						fwr.close();
					}
				}
			}

			gbwr.close();
			gfwr.close();

		} catch (IOException e) {
			logger.error("Cannot write updates chart data into file.", e);
		}

	}