我有一个WPF应用程序,其中我需要可视化y= y(x1,x2),其中x1,x2是线性坐标。我可以使用Oxyplot中的HeatMapSeries来做这件事,但是当我想要在同一窗口中绘制两组数据时,热图不是合适的工具。几个轮廓线序列会更好。现在,我已经尝试用与HeatMapSeries相同的方式来实现这一点,效果非常好:
public void PlotHeatMap (){
OxyPlot.PlotModel model = new PlotModel { Title = "2-D data" };
model.Axes.Add( new OxyPlot.Axes
AutoScale OxyPlot图表。例如,我有这样的东西。
using OxyPlot;
using OxyPlot.Axes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using S
我有一个Wpf应用程序,它显示一个绘图视图,也有一个按钮,它调用一个函数,根据它的数据自动缩放绘图。我遇到的问题是,如果我使用键盘或鼠标平移/缩放与绘图视图交互,我的自动缩放按钮,它只是设置轴的最大值和最小值,并不会使绘图视图发生明显的变化。我已确认在对象本身中修改了最大值/最小值,但这些更改不会显示在绘图视图中。
public class ViewModel
{
public const int maxSamples = 45000;
public ViewModel()
{
this.PlotModel = new PlotModel();
我必须在WPF项目中实现一个简单的柱状图输出。我为它选择了OxyPlot库。设计模式当然是MVVM。相关的源代码部分如下所示。当我运行这个项目时,我得到的是一个空图表,在x轴上有类别1到5(这是正确的),在y轴上有0到100的值(这也是正确的,因为我应该显示百分比)。
数据集合(类别轴的名称为“困难”,值轴的名称为“百分比”)“正确填充了值,我已经检查过了。
但是没有显示任何列。所以我想知道我做错了什么。我根据构建了我的示例,并基于我们在大学的wpf课堂上展示的一个示例。
有什么建议吗?
问候罗兰
using System;
using System.ComponentModel;
using
在panning.Because之后,我试图在y轴上找到视图的最大值和最小值,我想放大屏幕。
代码
using GalaSoft.MvvmLight.Command;
using OxyPlot;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
usin
我可以使用IsAxisVisible = false移除轴,就像一样,但是当我这样做时,就不能再平移或缩放图形了。
图不平移的示例代码(使用Oxyplot2.0):
public class MainViewModel
{
public MainViewModel()
{
var tmp = new PlotModel { Title = "Simple example", Subtitle = "using OxyPlot" };
tmp.Axes.Add(new
我想从实时x-y坐标数据(使用OxyPlot)绘制等高线图。
我已经看过使用ContourSeries给出的示例,但我在理解如何实现轮廓时遇到了问题。
示例代码如下:
namespace ExampleLibrary
{
using System;
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Series;
[Examples("ContourSeries"), Tags("Series")]
public class ContourSeriesExamples
{
private static
我想通过XAML定义一个HighLowSeries。由于HighLowSeries-graphs在oxyplot.wpf命名空间中不可用,所以我创建了以下类:
public class HighLowSeries : OxyPlot.Wpf.XYAxisSeries
{
public HighLowSeries()
{
this.InternalSeries = new OxyPlot.Series.HighLowSeries();
}
public override OxyPlot.Series.Series CreateModel()
我想使用OXYPLOT库添加具有共享x轴的多个绘图。示例代码如下所示,它设置了4个不同的y轴,共享相同的x轴。然而,我只能在第一个x&y轴上绘制数据,而不能绘制其他轴上的数据。任何类型的建议都将不胜感激。
[Example("Untitled")]
public static PlotModel Untitled()
{
var plotModel1 = new PlotModel();
plotModel1.PlotMargins = new OxyThickness(40,20,40,30);