Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all 2061 articles
Browse latest View live

Closed Unassigned: ToPdf extension method [10172]

$
0
0
The PlotModel has the ToSvg method. I was searching for the pdf export functionality and had to use one of the examples to find out how to do this.

I think it would be great if a small extension method could be added:

```
public static byte[] ToPdf(this PlotModel plotModel)
{
Argument.IsNotNull(() => plotModel);

return ToPdf(plotModel, plotModel.Width, plotModel.Height);
}

public static byte[] ToPdf(this PlotModel plotModel, double width, double height)
{
Argument.IsNotNull(() => plotModel);

using (var memoryStream = new MemoryStream())
{
PdfExporter.Export(plotModel, memoryStream, width, height);

return memoryStream.ToArray();
}
}
```
Comments: Decided to remove ToSvg instead! I think it is better to reduce the number of ways to export to Svg/Pdf. Export is documented at http://oxyplot.org/doc/ExportPdf.html and http://oxyplot.org/doc/ExportSvg.html

Created Unassigned: Remove AutoAdjustPlotMargins [10173]

$
0
0
This property is redundant.
Set the default PlotMargins = (NaN,NaN,NaN,NaN), this should match AutoAdjustPlotMargins = true.
When a margin is NaN, the margin should be auto adjusted.
The `ActualPlotMargins` contains the actual values.

Edited Unassigned: Remove AutoAdjustPlotMargins [10173]

$
0
0
This property can be redundant if the definition of `PlotMargins` is changed.
Set the default `PlotMargins` = (NaN,NaN,NaN,NaN), this should match AutoAdjustPlotMargins = true.
When a margin is NaN, the margin should be auto adjusted.
The `ActualPlotMargins` contains the actual values.

Edited Unassigned: Remove AutoAdjustPlotMargins [10173]

$
0
0
This property can be redundant if the definition of `PlotMargins` is changed.
Set the default `PlotMargins = (NaN,NaN,NaN,NaN)`, this should match AutoAdjustPlotMargins = true.
When a margin is NaN, the margin should be auto adjusted.
The `ActualPlotMargins` contains the actual values.

Edited Unassigned: Remove AutoAdjustPlotMargins [10173]

$
0
0
This property can be redundant if the definition of `PlotMargins` is changed.
Set the default `PlotMargins = (NaN,NaN,NaN,NaN)`, this should match `AutoAdjustPlotMargins = true`.
When a margin is NaN, the margin should be auto adjusted.
The `ActualPlotMargins` contains the actual values.

Closed Unassigned: No response while plotting same point in large number. [10171]

$
0
0
Hello,

Thanks again for this great library.

I have a problem while plotting Line series.

Generally the library works fine.
At some scenario, my application have huge collection of same point to be plotted on plot.

As the count of collection increases, the rendering of plot becomes slower,
As some point, it completely not responding.

Here is my dummy method to populate plot model.
``` C#
public PlotModel GetPlotModel()
{
int numberOfPoints = 100000;
var series = new LineSeries();
var title = string.Format("{0} (n={1})", series.Title, numberOfPoints);
var plotModel = new PlotModel(title);
for (int i = 0; i < numberOfPoints; i++)
{
series.Points.Add(new ScatterPoint(1000, 1000));
}
plotModel.Series.Add(series);
return plotModel;
}
```

Please help me to solve this issue.

Thanks.
Comments: This should be posted under discussions. ScatterSeries has a BinSize property that should solve this issue.

Commented Unassigned: No response while plotting same point in large number. [10171]

$
0
0
Hello,

Thanks again for this great library.

I have a problem while plotting Line series.

Generally the library works fine.
At some scenario, my application have huge collection of same point to be plotted on plot.

As the count of collection increases, the rendering of plot becomes slower,
As some point, it completely not responding.

Here is my dummy method to populate plot model.
``` C#
public PlotModel GetPlotModel()
{
int numberOfPoints = 100000;
var series = new LineSeries();
var title = string.Format("{0} (n={1})", series.Title, numberOfPoints);
var plotModel = new PlotModel(title);
for (int i = 0; i < numberOfPoints; i++)
{
series.Points.Add(new ScatterPoint(1000, 1000));
}
plotModel.Series.Add(series);
return plotModel;
}
```

Please help me to solve this issue.

Thanks.
Comments: LineSeries should show no line. ScatterSeries should show only one point if `BinSize` is set. OxyPlot still needs to evaluate all points to figure out this, to improve performance the client application (that probably knows more about the data) could remove the duplicate data points.

Commented Unassigned: incorrect and missing points rendered from LineSeries [10170]

$
0
0
In RederingExtensions the:
* First point is always added regardless of whether it's inside the clipping region or not
* First point of every clipped line segment is skipped

In addition, there are a couple of performance issues:
* Boxing is occurring on every ScreenPoint
* New lists are constantly being created instead of just clearing the old list

I think I fixed the issues (see attached). I also added another performance improvement of injecting the intermediate output buffer for ScreenPoints. This prevents the buffer from constantly copying itself and stressing 3rd generation garbage collection. This may be able to be omitted in lieu of presizing the buffer. However, I chose the less clean interface to reduce the risk of garbage collection killing our app. This is just for our stuff, since we're rendering millions of points using MVVM. The garbage collector was actually killing our application performance due to Oxyplot (we run an instrument and it was shutting our data collection down). _BTW, do I need to copy your copyright into the attached file, or is it OK to just simply include the license file in our distribution & installer?_

I actually have permission to give you the full source that allows us to render millions of points using MVVM if you desire. You could incorporate everything but data appendage into your project without messing things up too much. There are a few things that you could do cleaner by having it in your source. I have some code for data appendage also, which doesn't require any series to be redrawn, but has some extra state to manage. Just let me know if you would like any of this.
Comments: Yes, the test program must be executed outside the IDE. I forgot that the first time I executed it :) I did not test changing the order of the tests, what is the reason to this behavior? I would like to try changing the output buffer to an array, but I am not sure how much this will influence the total execution time (including rendering to a real device), need to check that in a profiler.

Commented Unassigned: incorrect and missing points rendered from LineSeries [10170]

$
0
0
In RederingExtensions the:
* First point is always added regardless of whether it's inside the clipping region or not
* First point of every clipped line segment is skipped

In addition, there are a couple of performance issues:
* Boxing is occurring on every ScreenPoint
* New lists are constantly being created instead of just clearing the old list

I think I fixed the issues (see attached). I also added another performance improvement of injecting the intermediate output buffer for ScreenPoints. This prevents the buffer from constantly copying itself and stressing 3rd generation garbage collection. This may be able to be omitted in lieu of presizing the buffer. However, I chose the less clean interface to reduce the risk of garbage collection killing our app. This is just for our stuff, since we're rendering millions of points using MVVM. The garbage collector was actually killing our application performance due to Oxyplot (we run an instrument and it was shutting our data collection down). _BTW, do I need to copy your copyright into the attached file, or is it OK to just simply include the license file in our distribution & installer?_

I actually have permission to give you the full source that allows us to render millions of points using MVVM if you desire. You could incorporate everything but data appendage into your project without messing things up too much. There are a few things that you could do cleaner by having it in your source. I have some code for data appendage also, which doesn't require any series to be redrawn, but has some extra state to manage. Just let me know if you would like any of this.
Comments: Also note the changes I did in rev. 935 related to a hot-spot in the DataPointSeries.InternalUpdateMaxMin method.

Created Unassigned: Improve rendering performance [10174]

$
0
0
Try using an array instead of a list for the outputbuffer in the DrawClippedLine extension method.

Commented Unassigned: incorrect and missing points rendered from LineSeries [10170]

$
0
0
In RederingExtensions the:
* First point is always added regardless of whether it's inside the clipping region or not
* First point of every clipped line segment is skipped

In addition, there are a couple of performance issues:
* Boxing is occurring on every ScreenPoint
* New lists are constantly being created instead of just clearing the old list

I think I fixed the issues (see attached). I also added another performance improvement of injecting the intermediate output buffer for ScreenPoints. This prevents the buffer from constantly copying itself and stressing 3rd generation garbage collection. This may be able to be omitted in lieu of presizing the buffer. However, I chose the less clean interface to reduce the risk of garbage collection killing our app. This is just for our stuff, since we're rendering millions of points using MVVM. The garbage collector was actually killing our application performance due to Oxyplot (we run an instrument and it was shutting our data collection down). _BTW, do I need to copy your copyright into the attached file, or is it OK to just simply include the license file in our distribution & installer?_

I actually have permission to give you the full source that allows us to render millions of points using MVVM if you desire. You could incorporate everything but data appendage into your project without messing things up too much. There are a few things that you could do cleaner by having it in your source. I have some code for data appendage also, which doesn't require any series to be redrawn, but has some extra state to manage. Just let me know if you would like any of this.
Comments: I think this issue (incorrect/missing points) is fixed, can we continue the performance improvements in https://oxyplot.codeplex.com/workitem/10174?

Edited Unassigned: Improve rendering performance [10174]

$
0
0
Try using an array instead of a list for the outputbuffer in the DrawClippedLine extension method.

See also discussion in https://oxyplot.codeplex.com/workitem/10170

Source code checked in, #2f1fbaf08344

$
0
0
Fix .NET 4.0 example build error

Commented Unassigned: Poor live data performance [10134]

$
0
0
Based on [this article](https://oxyplot.codeplex.com/discussions/281036) I'm using PlotModel.RefreshPlot(true) frequently to load live data, approximately 20 times per second or so, but the performance is not good. It is sluggish and lags behind.

I have 8 line series with 1000 samples/sec each, but reducing the data frequency does not seem to help much, so this does not seem directly related to drawing performance.

There are a few issues:
* RefreshPlot(true) seems to queue on the GUI thread, probably with BeginInvoke, so that if it runs sluggishly it will also start lagging behind with several seconds in a short time.
* RefreshPlot generally feels very slow for a live data scenario
* The GUI thread is locked for big chunks of the time, so even moving the parent window is very sluggish

I am on a powerful PC with pretty recent CPU and GPU, so that should not be the problem. Running Windows 8, but same is seen on Win7.

I have not yet dug into the source code of Oxyplot, but are there any tips on how to improve live data rendering?
Comments: @Anjdreas: Did you run your tests again?

Commented Unassigned: Poor live data performance [10134]

$
0
0
Based on [this article](https://oxyplot.codeplex.com/discussions/281036) I'm using PlotModel.RefreshPlot(true) frequently to load live data, approximately 20 times per second or so, but the performance is not good. It is sluggish and lags behind.

I have 8 line series with 1000 samples/sec each, but reducing the data frequency does not seem to help much, so this does not seem directly related to drawing performance.

There are a few issues:
* RefreshPlot(true) seems to queue on the GUI thread, probably with BeginInvoke, so that if it runs sluggishly it will also start lagging behind with several seconds in a short time.
* RefreshPlot generally feels very slow for a live data scenario
* The GUI thread is locked for big chunks of the time, so even moving the parent window is very sluggish

I am on a powerful PC with pretty recent CPU and GPU, so that should not be the problem. Running Windows 8, but same is seen on Win7.

I have not yet dug into the source code of Oxyplot, but are there any tips on how to improve live data rendering?
Comments: @objo: Sorry, I meant to do that but did not find the time. I just ran a new test: 59 fps when stopped __RefreshPlot(true) / original nuget (2014.1.231.1)__ 2kHz: 12 fps __InvalidatePlot(true) / original nuget (2014.1.231.1)__ 2kHz: 12 fps 5kHz: 8 fps __InvalidatePlot(true) / latest nugets (2014.1.270.1)__ 2kHz: 14 fps 5kHz: 11 fps In FPS, not a significant increase, but there is definitely an improvement. However, I do feel there is a significant improvement on the GUI responsiveness such as dragging the sample rate slider while running at 5 kHz sampling rate. Don't have any numbers on it, but it feels like a big difference. You can close this issue now. Good job!

Source code checked in, #160595e9bf65

$
0
0
add Decimator property to LineSeries (from moes_leco with some modifications)

Source code checked in, #065a6cda4d9c

$
0
0
got rid of redundant valid point checks and improved speed of existing checks (from moes_leco)

Source code checked in, #289b7725a539

New Post: Programmatically add graph to XAML form C#

$
0
0
Check ANY example.

In ViewModel:
PlotModel.Series.Add(ls);

New Post: Programmatically add graph to XAML form C#

$
0
0
Oh no! You didn't get it. I have to declare new Plot from the C# code and then add it to Canvas and so on. I mean when I compelling my project there are not Plot blocks at all!
Viewing all 2061 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>