How can I use different colours for in-text citations and figure hyper-references in RMarkdown?

Advertisements Consider the following RMarkdown document: — output: pdf_document: number_sections: true fig_caption: yes enter code here title: ‘Title’ author: – Name geometry: margin=1in bibliography: references.bib csl: something.csl link-citations: yes linkcolor: blue urlcolor: black header-includes: \usepackage{setspace} \usepackage{graphicx} \usepackage[colorlinks]{hyperref} \usepackage[all]{hypcap} Lorem ipsum [@reference] “`{r landscape, echo=FALSE,include=TRUE,warning=FALSE,fig.cap="\\label{fig:landscape}Caption"} knitr::include_graphics("file.png") “` Referencing to \autoref{fig:landscape}. When I run this sort of… Read More How can I use different colours for in-text citations and figure hyper-references in RMarkdown?

X and Y-axises is duplicated when major_formatter is set

Advertisements I have a code to plot an empty graph: from datetime import datetime, timedelta from matplotlib import pyplot, dates pyplot.yticks([0,1,2,3,4]) ts_start = datetime.now() – timedelta(hours=1) ts_end = datetime.now() delta = timedelta(minutes=10) x_dates = dates.drange(ts_start, ts_end, delta=delta) pyplot.xlim(x_dates[0], x_dates[-1]) # fmt = dates.DateFormatter(‘%Y-%m-%d %H:%M:%S’) # pyplot.axes().xaxis.set_major_formatter(fmt) pyplot.tick_params(axis=’x’, labelrotation=30) pyplot.xticks(x_dates) pyplot.show() I want to display time… Read More X and Y-axises is duplicated when major_formatter is set

Trying to change line thickness with matplotlib.mpatches.Patch

Advertisements I am manually making a legend as there are too many inputs in my figure, so I use matplotlib.mpatches.Patch to make legend using: orange_patch = mpatches.Patch(color=’orange’, label=’n=505 distribution’, lw = 1) grey_patch = mpatches.Patch(color = ‘grey’, label = ‘n=100 sampled 100 times’, lw = 1) plt.legend(handles=[orange_patch, grey_patch], frameon = False) This works, but the… Read More Trying to change line thickness with matplotlib.mpatches.Patch