Datanitro Charts - excel

How do I control the position of a chart on the Excel sheet using Datanitro? I thought that by setting the active cell it would be positioned there but it always comes out as top left where it obscures cells with calculated results that I want to remain visible.

You can pass x and y to Image to position a chart: https://datanitro.com/docs/images.html#x
With nitroplot, you can pass x and y to the graph library:
nitroplot.graph(x = 123, y = 456)

Related

How to reverse the x y axis of a chart in Excel or Powerpoint?

I use the excel data to created a chart on excel
But I would like to display the name on the left(y axis) and the numbers display on the bottom (x asis).
Is is possible to reverse the x y axis of a chart in excel?
Here is a demo create by roating an image.
Thank you.

How to avoid "A Chart may only have up to 256 series" issue (Excel VBA)

I'm trying to build bubble chart from a scratch in excel. Below is piece of code I'm using. Everything works fine until SeriesCollection.NewSeries reaches 256. Then I'm getting error message: A Chart may only have up to 256 series.
Can you anybody help me, how to avoid this issue. Is there any more elegant solution? Thanks a lot for any of your hint or advice.
Source code for my bubble chart:
With wsAnalytics.ChartObjects.Add(Left:=0, Width:=995, Top:=0, Height:=580)
For i = 1 To Range("Config_BubbleChartData").Rows.Count
.Chart.SeriesCollection.NewSeries
.Chart.SeriesCollection(i).name = Range("Config_BubbleChartData").Rows(i).Cells(1, 1)
.Chart.SeriesCollection(i).XValues = Range("Config_BubbleChartData").Rows(i).Cells(1, 3)
.Chart.SeriesCollection(i).Values = Range("Config_BubbleChartData").Rows(i).Cells(1, 4)
Select Case BubbleColor
Case 1
.Chart.SeriesCollection(i).Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
Case 2
.Chart.SeriesCollection(i).Format.Fill.ForeColor.RGB = RGB(0, 0, 255)
Case 3
.Chart.SeriesCollection(i).Format.Fill.ForeColor.RGB = RGB(0, 255, 0)
End Select
If i = 1 Then .Chart.ChartType = xlBubble3DEffect
.Chart.SeriesCollection(i).BubbleSizes = "=" & Range("Config_BubbleChartData").Parent.name _
& "!" & Range("Config_BubbleChartData").Rows(i).Cells(1, 5).Address(1, 1, xlR1C1)
Next i
You only need as many series as you have colors. Certainly you don't need more than 255 colors, since no human would be able to distinguish more than a dozen in a cluttered bubble chart.
Set up the data with four columns for X, Y, bubble size, and bubble color. Append another column for each color in the bubble color column, and use the color name as the column header. Use an IF formula in these columns to put the Y value for each color into the appropriate column.
In my example, I have X and Y in columns A and B, bubble size and color in C and D, plus the bubble color names in E1:G1. The formula in cell E2 is
=IF($D2=E$1,$B2,NA())
and I've filled this into E2:G16. The result is the Y value if the column header matches the color, and #N/A otherwise, which will not plot.
Select A2:C19 and create the bubble chart (top left chart).
Click the Select Data button on the Chart Tools > Design tab of the ribbon, select the only series in the chart, and Edit it, so cell E1 is used for the name, and E2:E16 is used for the Y values. Keep A2:A16 as the X values and C2:C16 as the bubble size. This series will have the default color for the first series, which in Excel 2013 and 2016 is blue (top right chart).
Stay in or return to the Edit Data dialog, and add a series. Use cell F1 for series name, A2:A16 as X values, F2:F16 as Y values, and C2:C16 as the bubble size. This series will use the default second color, orange (bottom left chart).
Add one more series, use cell G1 for series name, A2:A16 as X values, G2:G16 as Y values, and C2:C16 as the bubble size. This series uses the default third color, gray (bottom right chart).
Note that all series use the same X values and bubble sizes, but different Y values.

Excel scatter plot

Hello and good day to all
I have question related to excel graph. I have some set of values like this
Now I want to plot these values as a scatter graph. I want to to draw in such a way that by keeping X values same and 4 different Y plots i.e. A, B, C, D in a single graph. Meaning I dont want to merge these Y values on a single X value. Is there any way to do that? I thank you for your time and help.
The data does not make much sense. All X values are exactly the same, so all data markers will be at exactly the same X position.
To create a scatter chart with multiple series:
- select the data from A1 to B11
- insert a scatter chart
- select the B, C, D ranges (C1 to E11) and copy
- select the chart and use Paste Special > insert as new series with series name in first row
Since all X values are the same, many data points overlap and are not distinguishable.
Edit after comment: if you do NOT want to plot the values at their true X position (i.e. the value 1.4), then use four pairs of X / Y coordinates. Use X values 1 to 4 with A to D. Then use text boxes to replace the X axis labels or hide the labels and show the legend instead.

How to put two x,y coordinate values as one in scatter chart in excel

I want to do something like this
I want to make a point x,y coordinate for one and x,y for another and show two points in a single scatter chart.
I am unable to figure out how to do this
x y x2 y2
1 1 1 8
From data above I need to show two points (1,1) and (1,8)
Depending on your data layout, the data points can be added as one series or as two series. Steps vary with your Excel version.
Try this: click an empty cell that has no data in neighbor cells. Click Insert > XY Scatter chart. This will create a blank XY chart. Now add the series.
Right-click the chart > Select Data > Add > select the range(s) for the X and Y values. Repeat for any other series.
If the data is in one contiguous table, you only need one series.

Importing XY coordinates from Excel to MatLab

I have imported my XY data (in the same excel worksheet) to matlab with all the X and Y coordinates in separate columns ('FHC'), X is in column b and Y in c. I want to plot these using using k-means.
I got stuck cause I don't like to plot all the coordinates, I like to include the first 10, skip 2 cells and then include the next 10 ect.I tried to specify cells like this (b2:b12,1);(c2:c12,2), it exceeds matrix dimensions?
How can I tell matlab from what cell to what other cell that I want it to include, possibly tell it to skip some cells in between? My code looks like this at the moment (but now it plots all the X's and all the Y's);
X =['FHC',(:,1);(:,2)] %written differently
opts = statset('Display','final');
[idx,ctrs,sumd,D] = kmeans(X,1,...
plot(X(idx==1,1),X(idx==1,2),'r.','MarkerSize',12)
hold on
plot(ctrs(:,1),ctrs(:,2),'ko',...
legend('Cluster 1','Centroid',...
If X and Y are cells then try this:
%if X is a n by 2 cell array
hold on
for ii=1:2:length(X)
plot(X{ii,1}(1:10),X{ii,2}(1:10),'r.','MarkerSize',12);
end
hold off

Resources