Logarithmic scale maximum not visible · Issue #1255 · oxyplot/oxyplot · GitHub
Skip to content

Logarithmic scale maximum not visible #1255

Open

Description

@wkoeter

IF BUG, INCLUDE THIS PART:

Steps to reproduce

Using packages:

<packages>
  <package id="OxyPlot.Core" version="1.0.0" targetFramework="net45" />
  <package id="OxyPlot.Wpf" version="1.0.0" targetFramework="net45" />
</packages>
  1. Create PlotModel
        public PlotModel GetPlot()
        {
            var plot = new PlotModel();
            plot.PlotType = PlotType.XY;

            plot.Axes.Add(new LogarithmicAxis()
            {
                Minimum = Math.Pow(10, -1),
                Maximum = Math.Pow(10, 3),
                Position = AxisPosition.Bottom,
                Base = 10,
                UseSuperExponentialFormat = true,
            });

            plot.Axes.Add(new LogarithmicAxis()
            {
                Minimum = Math.Pow(10,-2),
                Maximum = Math.Pow(10, 1),
                UseSuperExponentialFormat = true,
                Position = AxisPosition.Left,
                MinorTickSize = 1,
                Base = 10,
            }); ;

            return plot;
        }

Export to PDF or PNG

        static void Main(string[] args)
        {
            var pngExporter = new PngExporter();

            var t1 = new Thread(() =>
            {
                using (var pngStream = File.Open("bodeMag.png", FileMode.Create))
                {
                    pngExporter.Width = 900;
                    pngExporter.Height = 600;
                    pngExporter.Export(new BodeMag().GetPlot(), pngStream);
                }
            });
            
            t1.SetApartmentState(ApartmentState.STA);
            t1.Start();

            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();
        }

Platform:
.NET version: 4.5

Expected behaviour

Plot an X and an Y axis with minimum and maximum visible

Actual behaviour

Full range of Y is visible (max = 10^1).
X Maximum is not visible (10^3 is missing).

bodemag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions