|
So, how was the salmon?
Anyway I got 'yer Codez. It's like 6 lines of code.
# Install & Load Library
if (!require("readxl")) install.packages("readxl")
library("readxl")
# Choose & Read Excel file, the 2 denotes the desired sheet number.
my_data <- read_excel(file.choose(), 2)
# Extract data from the desired columns. RStudio will provide drop-down with column names.
Ydata <- my_data$Column_With_Ydata
Xdata <- my_data$Column_With_Xdata
# Plot data
plot(Ydata, Xdata)
As with any code you can get as fancy as you want, but for a one time look see...
It was broke, so I fixed it.
|
|
|
|
|
The salmon was exquisite, thanks for asking. Served with fresh asparagus and pasta shells, and accompanied with ice-cold Löwenbräu. If my coding were as good as my cooking, I would be richer than Bill Gates!
As for the rest of it, thanks, but I have decided to write an add-on to Excel to fix this problem, as I seem to recall having suffered from it before.
|
|
|
|
|
I just plugged two sets of random numbers into Excel (2013) and produced a proper scatter plot. I followed these steps to get the trend line: trendline example. Is your data set too big for Excel?
if (Object.DividedByZero == true) { Universe.Implode(); }
|
|
|
|
|
The scatter graph works fine for X-Y points, but the data collection points are equally spaced on the graph, where they are, in fact, non-linear to the point of being random. They are closely spaced at the start of the X-axis, becoming sparser further along - but they are essentially just points where data had been collected, and adhere to no mathematically defined function.
I want to impose a linear X-axis, say from 0 to 100, and have the graph points plotted along that linear axis. If I just use the X-Y data in a plot, then the X-axis is divided into equidistant points for the X value and the Y value plotted above it. If I add a third column of data to represent the X-axis, Excel accepts it but then draws two graphs, one for the X values and one for the Y values.
If it were not for the 11,000 odd data points, I would use a piece of graph paper...
|
|
|
|
|
Scilab seems like the way to go. Several of my scientific co-workers use that for dealing with data sets doing all kinds of stuffs that physics does with data, including non-linear axes.
|
|
|
|
|
Thanks, I will check it out.
|
|
|
|
|
You could have a look at GNUplot, it certainly meets your requirement for free.
|
|
|
|
|
Having just Bingled that, it looks like it could be a winner - thanks.
|
|
|
|
|
I don't have a solution to offer, but I'm wondering if you could give some usable example data?(rigged-up or otherwise) I certainly recognize that this simple need has arisen more times than I can remember. It's time to dabble in tool-building.
This kind of issue is a lot like when I only want to make a simple chicken-scratch sketch using old-school Paint but the system I happen to be using only has a major drawing program that takes too-long/forever to load up. Or I just want to type a sentence and a bloated word processor starts loading.
Great to have some of the suggestions - checking out GNUPlot and some of the free-or-inexpensive options.
Pete K.
|
|
|
|
|
Pete Kelley wrote: This kind of issue is a lot like when I only want to make a simple chicken-scratch sketch using old-school Paint but the system I happen to be using only has a major drawing program that takes too-long/forever to load up. Or I just want to type a sentence and a bloated word processor starts loading.
'Twas always thus! In fact, although I said I didn't want to write a line of code, I am now thinking of writing an add-on for access to solve precisely this problem.
|
|
|
|
|
At the risk of sounding dumb, I can't see the problem - what are 'non-linear X values' ? You can't just mean they are at unequal X-intervals, because surely that is trivial, even for Excel?
|
|
|
|
|
See my reply to Foothill above. If you know of how it can be done, I would love to hear about it.
|
|
|
|
|
I must be being dumb. I read your reply above, could not visualise it. Although the chance of my being able to help is slim, could you post a scan of a scribbled hand plot to illustrate?
|
|
|
|
|
I found ZedGraph maybe 10 years ago, and have driven it with C# for countless graphing needs since then.
|
|
|
|
|
convert non-linear to linear via log base 10, base 2, etc.
|
|
|
|
|
Regrettably, although the X data points are non-linear, they are not non-linear in a predictable way, rather a random spacing, more densely pack at the root of the X-axis.
|
|
|
|
|
My apologies to those who replied yesterday, but did not get an answer. We currently have the builders in, converting my old office in the stables into a self-contained flat, and what with shopping in IKEA, making tea for the builders, making sure they were following my plans, and visiting a couple of clients, the day just disappeared.
|
|
|
|
|
Easy one to start the week
One charging a flat rate (8)
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
The oldies are the goodies!
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I've a good mind to let you have that
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
I'm being good and not solving it immediately!
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Good grief. Have you started renting your questions now?
This space for rent
|
|
|
|
|
It's the least I can do
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
Hedgehog - no, hang on, that would be a flat mate. Let's go with landlord.
98.4% of statistics are made up on the spot.
|
|
|
|
|
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|