Hi all,
I am using the source of historical data from: Stock Market Indices - Investing.com
I want to plot the price (graph plot) from the csv I downloaded (JKSE / Jakarta Stock Composite Index).
But, the x-tick is number 1-400, I want to show year if possible like 1990 1995 2000 for the x-tick
and another problem:
They get it upside down. The first one is the top row, thus the graph is mirrored with the real graph from yahoo finance or investing.com, the current price is 6800 , not below 1000. If it is below 1000 perhaps need to wait for another startup dotcom bubble edition III.
Edit:
This code works with data at x-axis but it is in reverse, the right one should be newer date. This is a new kind of chart, mirroring.
using CSV, DataFrames, Plots, Plots.PlotMeasures
filejak = "./csv/Jakarta Stock Exchange Composite Index Historical Data.csv"
dfjak = CSV.read(filejak, DataFrame)
dfjak.Price .= parse.(Float64, replace.(dfjak.Price, "," => ""))
dfjak[!,"Change %"] .= parse.(Float64, replace.(dfjak[!,"Change %"], "%" => ""))
p1 = plot(dfjak.Date, dfjak.Price, title="",
label="Jakarta Stock Exchange (Price)", xlabel="", ylabel="")
p2 = plot(dfjak.Date, dfjak[!,"Change %"], title="",
label="Jakarta Stock Exchange (% Change)", xlabel="", ylabel="")
plot(p1, p2, size=(1200,800), layout = (2, 1),
legend=:outerright, left_margin=10mm, bottom_margin=5mm,
xaxis = "", yaxis = "Frequencies")