As I told in my previous thread, I'm trying to find my way out with the PGFPlots package. The package is installed and I added \usepackage{pgfplots} in the Latex Preamble section. I pressed the TeX box and inserted the following code:


As shown in the image: (The document contains also some lines written in Hebrew - RTL language)

enter image description here

I compiled the LyX document with pdflatex and it shows an empty page (without any errors). But if I'll compile it with LuaTex it will show the following errors:

enter image description here

And if i'll press show output anyway, it will show the wanted graph (as shown in the image), but it will make the hebrew words reverse.

enter image description here

I prefer to use pdflatex because its the default option (and it keeps the Hebrew words right). How can I make pdflatex accept and show the graphs? I also the other formats but none of them showed the graph.


#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\save_transient_properties true
\origin unavailable
\textclass heb-article
\use_default_options true
\maintain_unincluded_children false
\language hebrew
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip smallskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false


\begin_layout Standard
\begin_inset ERT
status open

\begin_layout Plain Layout

begin{tikzpicture} [scale=1.0] 
begin{axis} [xlabel=$x$, ylabel=$f(x)$, width=10cm, grid=major] 
addplot [blue, line width = 1, smooth, domain=-2:2] {3*x^2 + 5*x - 2}; 



  • @Raven thank you for the replay. I have added the MWE with a better example.
    – vesii
    Commented Dec 28, 2018 at 23:22
  • @scottkosty I added those two lines (although I don't understand how they help).
    – vesii
    Commented Dec 29, 2018 at 13:41
  • regarding "although I don't understand how they help", did you test your original minimal example? LyX says "not a readable LyX document". Different LyX versions have different file formats since they have different features. When opening a .lyx file, LyX needs to know what format the file is in. In addition, it's useful because it seems you forgot to specify your LyX version. For LyX bugs/questions, please always specify your LyX version.
    – scottkosty
    Commented Dec 29, 2018 at 21:13
  • Is this issue related to Hebrew? That is, can you reproduce the issue without anything related to Hebrew (e.g., "Hebrew Article" class in your .lyx file)? I suggest you make your MWE as minimal and "vanilla" as possible. I can reproduce your issue with LyX 2.3.2. I don't think this info helps you much, but at least you know that upgrading to newest version of LyX will not fix your issue. I suggest to create a corresponding .tex MWE in LyX by going to File > Export > LaTeX (pdflatex). This will help the LaTeX experts around here help you (most of them do not use LyX).
    – scottkosty
    Commented Dec 29, 2018 at 21:26


You must log in to answer this question.

Browse other questions tagged .