Org-mode mailing list
 help / color / mirror / Atom feed
* org-plot line colors
@ 2020-11-21 12:14 ian martins
  2020-12-13 15:45 ` TEC
  0 siblings, 1 reply; 2+ messages in thread
From: ian martins @ 2020-11-21 12:14 UTC (permalink / raw)
  To: Org-Mode mailing list

I wanted to change line colors but didn't find a way. Is there a way?

This almost works:

    #+PLOT: ind:1 deps:(2) set:"set style line 1 lc rgbcolor 'blue'"

but it needs a `linestyle' set for each line, like this:

    plot '/tmp/org-plotiLccTT' using 1:2 with lines title 'some title' ls 1

note the `ls n' at the end. I think this is safe since there are
default linestyle settings, so long as n doesn't exceed the number of
linestyles available for the mode it doesn't matter if the plot config
defines them.

also note that I used single quotes for the color name in the plot
config. I don't think org allows escaped quotes in headers. luckily
gnuplot allows single quotes.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: org-plot line colors
  2020-11-21 12:14 org-plot line colors ian martins
@ 2020-12-13 15:45 ` TEC
  0 siblings, 0 replies; 2+ messages in thread
From: TEC @ 2020-12-13 15:45 UTC (permalink / raw)
  To: emacs-orgmode


Hi Ian,

Sorry for the slow response, I'm marked your email though, so I'm now
getting back to you :)

ian martins <ianxm@jhu.edu> writes:

> I wanted to change line colors but didn't find a way. Is there a way?

Indeed! Though I do it with lisp, and using my patches.

I think I saw a patch about multiline #+plot / set but I forget (ment
to send an email about that actually...).

In case it helps, here's the sort of thing I have:

#+begin_src emacs-lisp
(defun org-plot/generate-theme (_type)
  "Use the current Doom theme colours to generate a GnuPlot preamble."
  (format "[...]
set linetype 1 lw 2 lc rgb '%s' # red
set linetype 2 lw 2 lc rgb '%s' # blue
[...]")
  (doom-color 'red)
  (doom-color 'blue))
(setq org-plot/gnuplot-script-preamble #'org-plot/generate-theme)
#+end_src

org-plot/gnuplot-script-preamble can be either a function, or a plain
string.

Regarding the "with lines" bit, I'm not exactly sure what's required to
be changed without looking over my patches again 😅 but I know I added
the capability to adapt the existing plot types quite easily.

If a particular modification seems like a good idea, do feel free to
share 🙂.

Hope that helps a bit,

Timothy.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-13 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21 12:14 org-plot line colors ian martins
2020-12-13 15:45 ` TEC

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git