Formatting Axis of a graph - ms-access

I am using the below VBA to set the Y axes format of my graph and it works fine
Code:
TrendGraph.Axes(2, 1).TickLabels.NumberFormat = "0.00%"
The problem happens when changing it to time:-
Code
TrendGraph.Axes(2, 1).TickLabels.NumberFormat = "hh:nn:ss"
I get the same issue with currency:
TrendGraph.Axes(2, 1).TickLabels.NumberFormat = "Currency"
TrendGraph.Axes(2, 1).TickLabels.NumberFormat = "£0.00"
Error Received:
Automation Error: Object is not connected to the server
Any help is appreciated

Related

Trouble with plotting complex large function in Octave

Hello Iam new with Octave and communications, and I'm trying to simulate different modulations using complex information signal as the following:
But even after I put points before each operator and all solutions that have come to mind I kept getting the same error result:
error: conversion of 71.3086 to octave_idx_type value failed
This is my code:
f = 1e5;
T = 1/f;
t = 0:T/100:2*T;
a = (10^5).*t;
w = 2.*a*pi;
vi = 0.6.+0.6(e.^((-1.*(a.-42).^2)./9).+e.^((-1.*(a.-24).^2)./9).+e.^((-1.*(a.-6).^2)./9)).*sin(w./3).+0.3.*(e.^((-1.*(a.-47).^2)./9).+e.^((-1.*(a.-29).^2)./9).+e.^((-1.*(a.-11).^2)./9)).*cos(w);
plot(t./1e6, vi, 'b', 'LineWidth', 2)
grid on
xlabel('Time (ns)');
ylabel('vi (V)');
xlim([0 (2*T)/f]);
ylim([0 1.2]);
I don't know anymore what to try to plot this.
Anyway thanks for your attention. :)

C# - Can not access File which is already being used - Iron OCR

I am using "Iron OCR", something like "Tesseract" to detect and scan certain Text from Screenshots.
Now I have the following error. Every time Iron OCR is used to scan an image for text it tries to access the Iron OCR log file which is somehow still used by the process before. So every time I get the error message that it can't access the log file because it is already in use. Nevertheless the Scan still works and I get a valid result even tho it gives me an exception because of that error.
My program works like this:
it takes a screenshots of certain areas of my screen.
it analyzes that image with Iron OCR and looks for text.
this process repeats itself infinitely.
I have following code:
//------------------------- # Capture Screenshot of specific Area # -------------------------\\
Rectangle bounds3;
Rect rect3 = new Rect();
bounds3 = new Rectangle(rect3.Left + 198, rect3.Top + 36, rect3.Right + 75 - rect3.Left - 10, rect3.Bottom + 30 - rect3.Top - 10);
CursorPosition = new Point(Cursor.Position.X - rect.Left, Cursor.Position.Y - rect.Top);
Bitmap result3 = new Bitmap(40, 14);
using (Graphics g = Graphics.FromImage(result3))
{
g.CopyFromScreen(new Point(bounds3.Left, bounds3.Top), Point.Empty, bounds3.Size);
}
//------------------------- # Analyze Image for Text # -------------------------\\
var Ocr = new IronTesseract();
using (var Input = new OcrInput(result))
{
Input.Contrast();
Input.EnhanceResolution(300);
Input.Invert();
Input.Sharpen();
Input.ToGrayScale();
try
{
//------------------- # This causes the Error - Using Try Catch to Ignore it # -------------------\\
var Result = Ocr.Read(Input);
text = Result.Text;
}
catch
{
}
}
Also removing all the above only using their "1 Line Code" gives the same error message:
var Result = new IronTesseract().Read(#"images\image.png").Text;
I hope someone can help me to figure out what exactly causes that issue.

making texreg (LaTex or HTML table output) work with splm model

My post follows after the one below, which remains unanswered.
In R - How to use spml objects in Stargazer
Since stargazer does not work with splm models, I tried texreg, as suggested in the post above. basically these is what I do:
library(spdep)
library(texreg)
fm<-Y ~ x+m+s+slag(x,listw=w.listw) #formula to be applied
#Model1- 1st Spatial RE model
m1 <- spml(formula=fm, data = spatialpaneldata,listw = w.listw, model="random", spatial.error="b", lag=T)
#Model2 - 2nd Spatial RE model
m2<- spml(formula=fm, data = spatialpaneldata,listw = w.listw, model="random", spatial.error = "kkp", lag=T)
then I apply texreg to get a nice table results output for my paper
texreg(list(m, m2), dcolumn = TRUE, booktabs = TRUE,use.packages = FALSE, label = "tab:3", caption = "Two spatial models.",float.pos = "hb!")
however, i get the error below:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘extract’ for signature ‘"splm"’
>
How can I make (extract) texreg applicable to spatial panel models, or splm models?
I hope I can get some help..

qmplot error Error in unlist(.all_aesthetics[1:42]) : object '.all_aesthetics' not found

I'm trying to plot points on a map using ggmap, ggplot2 libraries. I'm successful using get_map to prepare the map, then ggmap to plot it...although I'm only able to plot ~80 coordinate points before I get an error that I'm exceeding the google map api limit of 2048 chars. Does this limit seem correct/expected?
moving on to try using qmplot & qmap commands to (hopefully) overcome this constraint.
I'm successful with the qmplot command; I'm using:
qmap("austin", zoom = 11, source="google", maptype = "roadmap", scale = 2) to create the map.
NOT successful with qmap command. I'm using:
'qmplot(coord$lon, coord$lat, data = coord)`
coord is a df with lat/lon pairs.
I get the error: Error in unlist(.all_aesthetics[1:42]) :
object '.all_aesthetics' not found
I haven't been able to find (google) anything about this error mode.
To proof myself, I try running example code from pg 47 & 48:
https://cran.r-project.org/web/packages/ggmap/ggmap.pdf, example top of page 47
violent_crimes <- subset(crime,
offense != "auto theft" &
offense != "theft" &
offense != "burglary"
)
qmplot(lon, lat, data = violent_crimes, colour = offense,
size = I(3.5), alpha = I(.6), legend = "topleft")
preparing the violent crimes (using a built-in R dataset) command work fine. qmplot command results in the same error message that I"m getting with my code.
It's a bug that was addressed. See here
devtools::install_github("dkahle/ggmap")

Hovertool Bokeh "Cannot read property"

My problem is that in Chrome, when I have my cursor on my histogram hover my data, I have this error :
Uncaught TypeError: Cannot read property '0'
There is my code :
hist, edges = np.histogram(data,bins=3000)
plot = quad(
top=hist,
bottom=0,
left=edges[:-1],
right=edges[1:],
fill_color="#036564",
line_color="#033649",
tools="pan,wheel_zoom,box_zoom,reset, hover",
x_range=[-0.5,3.5],
plot_width=1100,
title="",
)
hover = plot.select(dict(type=HoverTool))
hover.tooltips = [('index','$index')]
resources = Resources("inline")
plot_script, plot_div = components(plot, resources)
html_script = mark_safe(encode_utf8(plot_script))
html_div = mark_safe(encode_utf8(plot_div))
figure()
return html_script, html_div
"data" is a array like this :
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.24,1,1.32,1,2,3]
I tried to add a "source" in the quad, changed the figure, changed my code for the one on the documentation but I still have my error.
For information, everything is working very well, except the hover tool.
Indeed, in the "hover box" I want another informations then just "index", but it's just for testing.
Thanks for reading !
Sorry I missed this earlier. You have uncovered a small bug with the hover tool that is particular to quad glyphs. In the mean time you can add hover.snap_to_data = False to get it to work.
Here is a GH issue you can track for the full solution:
https://github.com/bokeh/bokeh/issues/1644
A fix should be in the 0.7.1 release next Monday.
Also BTW, you are using a deprecated API. You should now write code like:
p = figure(...)
p.quad(...)