I'm using lazarus console, and im aware you have a set of basic colours that can be accessed through use of textcolor() but I want to know if there is a way to instead use RGB colours? I haven't been able to find a method for console online.
Thanks.
$RGBA = textcolor("#RRGGBBAA");
$RGB = textcolor("#RRGGBB");
Related
I am using Julia for potting.
I do the following:
img = load("/Users/xxxx/xxxx/xxxx-xxxx.png")
plot!(img)
plot!(x_coordinate_holder, y_coordinate_holder, color = :black, linewidth=0.4)
However when I add plotly() before the above code, it opens up a plot in the safari window, but it remains blank. Any ideas to fix this? The plot successfully shows up when I leave it with the default backend. My guess is that img is not supported with the plotly() backend. Can anyone confirm this?
According to the Julia Plots docs here, Only the gr(), hdf5() and pyplot() support the plotting of an image. Switching to one of those backends will resolve the issue.
I would like to know if i can increase the size of the bottom pane of the graph on the plot function chart_Series()
chart_Series(x$A, TA="add_TA(x$B)")
you don't need data to know what this will look like...
It is possible to modify some aspects of chart_Series using the pars and theme objects you can optionally pass to chart_Series. But I don't know if there is a way to feed in modifying the size of the y axis in add_TA etc without directly modifying the source code for add_TA. This is what I've done before, which is a bit messy, but works ... modify the source code.
The line in add_TA you want to modify is this, which is hard coded as (approximatly line 61 of add_TA):
plot_object$add_frame(ylim = range(na.omit(xdata)),
asp = 1)
Changing that line to this (the value of asp (aspect?) is changed), will give you something like what you want:
plot_object$add_frame(ylim = range(na.omit(xdata)),
asp = 3)
This change gives:
getSymbols("AAPL")
chart_Series(AAPL["2016"])
my_add_TA(SMA(AAPL["2016", 4])) #my_add_TA is add_TA with asp line changed
If you're unsure about how to modify the source code of a package, you could follow my answer to a related question here modify chart_Series source on modifying chart_Series as one approach. Another approach is just to recompile the source code for the package with your modifications.
I'm using the ZebraDesigner software to create a simple label with a QR Code. It looks good when I print it, but I also need the .prn file with all the information contained inside the QR Code to be "readable". When I open the .prn file with Notepad++, the QR Code line looks like this:
,:::::::::::::::::M07FHFI01FHFC00FFC1FMFC,::::M07C1F07C1FF80H0F801F0K07C,::::O01FKFH03FF0H01F07FHF07C,::::M07FE0F83E007FIF801F07FHF07C,::::M07FHF07FHFH03E0FFC1F07FHF07C,::::M07C00F83E007FIF801F0K07C,::::O01FF80H0HFC1FHFC1FMFC,::::M07C1F0H01FHFC1F07C,::::O01FF801FHFC1F0H01FF83FIFC,::::R07C1FF801FHFC0J01FHFC,::::M07FE0FJFH03E0I01F003E,::::M07C1FF83E007FE0F80I07FE0FFC,::::M07C00FKF83FF07FHF07C0H07C,::::W07FE0FFC,::::M07FMF07C1F07C1FMFC,::::M07C0J01F003FF07C1F0K07C,::::M07C1FHFC1F07C0H07C1F07FHF07C,::::M07C1FHFC1F07FE0FFC1F07FHF07C,::::M07C1FHFC1F0J0F801F07FHF07C,::::M07C0J01F07C0J01F0K07C,::::M07FMF07C0H07C1FMFC,::::,::::^XA
But i want it to be in pure ZPL, just like this one, shown in the The Zebra Programming Guide
:
^FO20,20^BQ,2,10^FDQA,0123456789ABCD
Does anyone know what should I do to generate the file like the one in the documentation or how can I convert it? I've already done a lot of research, but I can't sort it out.
Thanks!
I'm able to reproduce the problem by using a micro QR code.
If that's not mandatory, I suggest you use a "standard" QR code.
I managed to solve this. I reinstalled the printer via ZebraDesigner and changed its port from LPT to USB. Now the .prn file is finally being generated correctly.
It happens when you use different fonts on your label design. If you use Windows fonts, The ZebraDesigner will convert the text into a graphic.
So use Zebra fonts.
I'm using a headless gnuplot working great without X, but the problem is that it asks me to press enter after each plot so I can't do multiple plots in a script, they just don't generate when I try to do them without being able to press enter (with fork for example).
How can I plot headlessly without asking for the user to push enter?
Final edit: The problem was actually that I was using the wrong gnuplot binary. It works "headlessly" fine even with no one there to press confirm. So no need to export GNUTERM. See my other question for more details on the gnuplot binary.
Old Answer:
export GNUTERM=dumb
This tells gnuplot not to ask the user for anything and just run. I think it should be on by default but whatever. I set this env variable before running my scripts and they just run now without asking for input.
Edit: while it solved the problem, it seems like this doesn't actually do what I'm saying it does. Apparently this just tells gnuplot to plot in ASCII format? It still outputs my pngs though.
Double edit: It may have been all due to using the wrong gnuplot binary actually.
For the sake of readability, I'd like to know if there is a simple way to color parts of the text you output to a console. Both Linux Terminal and MS Command Prompt suggestions are welcome!
You can use ANSI escape codes in Unix like OS. Here's the theory about manipulating colors: http://tldr.es/1md
In Windows, there's console functions API.
Yes, you can use the sequence: [{attribute};{foreground};{background}m using the color codes.
This explains it more precisely.
EDIT: For the list of the colors and an output of how they look go here.