This is the discussion forum for OxyPlot.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!

Does OxyPlot fit my needs?

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

Sepidar wrote at 2014-02-04 16:24:

Hi,

Firstly, I know there is no component that is made for my specific use. I am asking this to check how OxyPlot is near to my needs and to estimate the time I might need to implement lacked features.

I am going to work on a scientific program which shows 2D contour plots, heat maps, grid lines and velocity vectors. Moreover, user might draw some lines on the data, or pick some points, as well as zoom and pan data. The area of the data is not necessarily rectangular.

Which of aforementioned abilities is already present and which I should implement by myself?
Is OxyPlot completely MVVM-friendly? (I read somewhere that its contour plot is not) How much time it takes for a newly-migrated-from-winforms developer to implement specific features?

Thank you in advance

objo wrote at 2014-02-04 19:18:

Right, HeatMapSeries and ContourSeries do not have WPF wrappers yet. Otherwise I am trying hard to make the library very MVVM-friendly.
https://oxyplot.codeplex.com/workitem/9999

Vector fields are not implemented, but should be easy to add as a custom series. Good idea for an example. Could also be included in the core library, I think.
https://oxyplot.codeplex.com/workitem/10127

See the "example browser" for examples on mouse events, grid lines, zooming and panning.
0

Tick display in auto panning line graph due to Screen Resolution

Lucas Miranda il y a 9 ans 0

I'm plotting a LineGraph using DateTimeAxis and real-time data by setting a Refresh function called from time to time (basically every second or so). It will add Points to the series based on the data at the time.


This is all done and working well. Problem is, when using a screen with a resolution of 1920x1080, the tick marks get a little crazy. I'm showing just the MajorTicks, and the default values display ticks every 2 seconds. But then, randomly, when it pans, sometimes it shows up the ticks every one second. Then, it goes back to the 'every 2 seconds' state. And it keeps going back and forth.


This only happens in this specific screen resolution.

Is there any example of 'OxyPlot for Xamarin.Android using' can reference???

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

starrycheng wrote at 2014-07-18 08:55:

Is there any example of 'OxyPlot for Xamarin.Android using' can be referenced???

Please send to my e-mail starrycheng@live.com,thanks. There is no example in the website which named 'http://oxyplot.org/'.

It shows:
Xamarin.Android Example
Under construction

Download component
Add references
Add a PlotView control
Bind to a PlotModel
0

Program is freezing when using Heatmap in a Windows Store app

Otto Meinzel il y a 9 ans mis à jour il y a 9 ans 1
I tried to use the Heatmap for an Windows store app, but its freezing the whole application. I tried the OxyPlot.Windows example browser and it turned out the basic Heatmap example is showing the same problem. I'am using Windows 8.1 and OxyPlot for Windows Apps Version 2015.1.893.0


I debugged the source code and it turned out that it's freezing when the ConvertToRandomAccessStream method of the OxyPlot.Windows.RenderContext class is called. The WriteBytes call inside the task causes the freeze: var task = Task.Run(() => dw.WriteBytes(memoryStream.ToArray()));

As a quick workaround for myself I moved the WriteBytes out of the Task and everything is working fine. I don't understand why dw.WriteBytes is not working inside a thread.


Can anyone reproduce this problem?

Axis Title display

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

steunissen wrote at 2011-11-17 14:46:

As said in my previous post I am using the DateTime axis as an horizontal axis. As the datetime value descriptions are rather long I have rotated the text by 90 degrees. But now my axis title disappears behind the axis values. Is there some kind of margin I can set on the title to lower it below the axis values ?

 

Sander.


objo wrote at 2011-11-18 06:21:

I see there are some problems with rotated text and position of axis title. I will add this to the issue tracker.

Interval column series

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

suhasbothe wrote at 2014-05-07 10:00:

Hi,

I am looking for range series.
I found interval bar series.
But I want interval column series .
How to plot it?

please help...


Best Regards,
Suhas Bothe

objo wrote at 2014-05-10 23:30:

This is not yet supported. I added the new feature: https://oxyplot.codeplex.com/workitem/10194

suhasbothe wrote at 2014-05-13 07:31:

Can you please share the code ?


Best Regards,
Suhas

OxyPlot - Synchronized Axis(s) for Two Chart

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

patilraviraj2007 wrote at 2012-04-12 08:56:

Hello Group Members/OxyPlot Team,

Many Thanks for giving us proper guidance on OxyPlot, I am using OxyPlot, Linear and DateTime Axis. I have Plotted two charts, where if I Zoom In/Out X-Axis of Chart1 then Chart 2 X-asis should be also perform Zoom In/Out respectively (based on operation performed) and vice versa.

Is it Possible to do in OxyPlot? Please suggest.

Thanks & Regards

Raviraj


objo wrote at 2012-04-18 21:18:

The axes have an AxisChanged event that you could subscribe to. The event should be raised every time the axis is changed by the user (panning, zooming, reset)


Tech_Junkie wrote at 2012-05-11 17:28:

How would you update the Axis or plot of the second chart? I'm looking for methods to change the axis (or plot) to zoom to an area between an upper and lower bound which are selected from another chart, but am unable to find how to do this. 


objo wrote at 2012-05-12 11:32:

Use the Zoom(double x0, double x1) method on the axes of the second chart. Remember to call InvalidatePlot(false) on the second chart's PlotModel afterwards.

If you are defining your plots in XAML, you can use the ActualModel property of the Plot control to access the plot models.


objo wrote at 2012-05-28 12:54:

See the new example in WpfExamples/CoupledAxesDemo

[Example("LineSeries and PlotModel MouseDown event")] in WPF?

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

seveland12 wrote at 2013-06-13 16:42:

I would like to allow the user to both drag individual points around and add new points using the mouse in my WPF application. The functionality I need seems to be entirely contained in the WinForms example I referenced in the subject line, but there isn't an obvious analogue for OxyPlot.WPF. Is there currently a way to do this in OxyPlot.WPF?

Thanks,

Steve

objo wrote at 2013-06-13 23:37:

It should work exactly the same way in WPF, check the example in the WPF example browser.

mmoosman wrote at 2013-11-25 20:22:

I believe I'm seeing the same problem. It looks to me like the Mouse events (MouseDown etc) are only accessible from the Oxyplot namespace version of the controls and not the controls available from the OxyPlot.WPF namespace.

I have been able to reproduce the handling from the example when building the control via code, but not directly through Xaml.

Thanks,

Mark

everytimer wrote at 2013-11-27 20:49:

I think you won't achieve mouse event handling through XAML...

mmoosman wrote at 2013-11-27 21:02:

I was able to work around the issue by using the IsVisibleChanged event on a TrackerControl.

However, fundamentally it seems that the OxyPlot.Wpf versions of the controls have a different inheritance path than the base OxyPlot versions. Specifically, the ScatterSeries control I'm looking at does not have inheritance back to UIPlotElement where the custom OnMouseDown, OnMouseMove, and OnMouseUp events are located. The examples from the source code are creating the controls in code from OxyPlot.Series rather than using the controls from OxyPlot.Wpf which is a point of confusion.

Mark

color palette in oxyimage

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

BlindMonk wrote at 2013-08-19 15:34:

I am not sure how to apply color palette in an oxyimage.

I made a byte array by scaling my array in [0,255], and then I want to apply gray(255) scaling on the data. but image decoder throws error, I am pasting my code below. Please help.
            var pallet = new OxyColor[255];
            OxyPalettes.Gray(255).Colors.CopyTo(pallet, 0);
            im = OxyImage.FromIndexed8(wid, ht, bPlot,  pallet, 96);
here, wid is width( say 100), ht is height (say 100), bPlot is byte[] (size 100x100). But then I get error in image decoder which says:
The image decoder cannot decode the image. The image might be corrupted.
Thanks a lot.

objo wrote at 2013-08-22 21:49:

Maybe the palette should have 256 entries?

The following should work:
        [Test]
        public void Discussion453825()
        {
            var data = new byte[100 * 100];
            int k = 0;
            for (int i = 0; i < 100; i++)
            {
                for (int j = 0; j < 100; j++)
                {
                    data[i + (j * 100)] = (byte)(k++ % 256);
                }
            }

            var palette = OxyPalettes.Gray(256).Colors.ToArray();
            var im = OxyImage.FromIndexed8(100, 100, data, palette);
            File.WriteAllBytes("Discussion453825.bmp", im.GetData());
        }
I have added this as a unit test.

BlindMonk wrote at 2013-08-27 17:39:

that worked, but I change 100 to 199, it doesnt!!
            var data = new byte[199 * 199];
            int k = 0;
            for (int i = 0; i < 199; i++)
            {
                for (int j = 0; j < 199; j++)
                {
                    data[i + (j * 199)] = (byte)(k++ % 256);
                }
            }

            var palette1 = OxyPalettes.Gray(256).Colors.ToArray();
            var im1 = OxyImage.FromIndexed8(199, 199, data, palette1);

objo wrote at 2013-08-27 23:09:

Thank you - this was a bug. I have corrected it, I think (DWORD aligning rows in the BITMAP pixel data section)
0

Ask for more details about the highlow series plot.

Eason5102 il y a 9 ans mis à jour il y a 9 ans 1

Can I ask, 1) how can I get a line to link the highlow series? 2) why the highlow series has no legend? 3) if there is a way to add the lable to show the highlow point value? Many Thanks.